Advertisements

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!

Advertisements

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.

 

Data Merging Charts and Graphs with FF Chartwell

lumbergh

The Data Merge feature of InDesign is great for merging text, but cannot take the text and parse it into a graph or a chart. This feature may be available through plug-ins purchased separately to Creative Suite/Cloud, but having the ability to create data merge projects that feature variable graphs or charts using only InDesign would be welcomed by many users.

In 2011, this site provided a proof of principle that pie charts and bar graphs could in fact be created via InDesign, Excel and Illustrator. Those interested can see those articles here and here.

Despite proving a point, the technique had several flaws:

  • The Excel files contained many formulas that were very complicated for the average user and likely to cause problems if the original database was replaced at any time;
  • The appearance of the graphs were limited to the graphics created in Illustrator, meaning any changes to the appearance of the graphs were complicated;
  • With the setup of the placed images used to make the charts, only one kind of graph could be merged at once.

It would be almost a year until InDesignSecrets co-host David Blatner wrote this piece concerning a solution using the FF Chartwell font created by the FontFont foundry:

Prior to this post, the FF Chartwell font had been considered as a solution but after reading David’s article, the issue was revisited. Reading the instructions for the FF Chartwell font looked promising, and the decision was made to bite the bullet and purchase the font.

Using the font (full instructions are available with the purchase of the font but can also be found here and this video here) has several advantages over my previous solutions:

  • Easy to set up;
  • The same data can presented using different charts in the same data merge record;
  • The appearance of the chart can take advantage of GREP styles, Nested styles, and the effects dialog box;
  • PDF processing time is faster with smaller size PDFs as a result.

There are some limitations that should be spelled out prior to a purchase of this font:

  • Most charts represent figures from 0-100. This is fine for percentile charts such as pie, rose, ring or radar charts, but limits the use of bar and line graphs;
  • While the font allows a pie graph to turn into a donut, be aware that the hole is made using a fill colour rather than being transparent;
  • The data in the charts must be integers (e.g. whole numbers, no fractions) and this means rounding results up or down accordingly. For percentile charts it is also important to make sure the total of figures in the data adds up to 100.

Tweaks or hacks to further improve the charts

There is a bar graph that represents figures from 0-1,000; but the graph appears from left to right and starts with a diamond shape. For those wanting a usual bar chart, here is the workaround.

  1. Use the Chartwell bars font to represent the number between 0-1000, and format according to the Chartwell instructions; but change the fill/stroke of the font to none.
    mergepic1
  2. In the paragraph palette, select paragraph rules and then select above line to the size of the text, using whatever size is felt necessary.
    mergepic2
  3. Now that the chart displays as rectangular start/finish bars, change the rotation of the textbox that contains the chart to 90 degrees rotation.
    mergepic3

A similar solution can be used when using a segmented bar graph, but instead of using the paragraph palette, use the character palette to create individual underlines for each segment. This can be further improved upon using GREP styles.

The illustration below was a bar graph using a paragraph style that had both above and below strokes, and the bottom has been clipped by putting the text box into its own frame.

mergepic3a

To make a piechart have a true donut hole rather than a solid circular fill (as shown in the picture below) follow these steps:

mergepic4

  1. Draw a circle the size of the desired hole and place it where the hole has to appear in the pie chart. Give this hole a paper fill and using the effects palette, set the opacity to 0%
  2. Select both the drawn circle and textbox that contains the pie chart and group them
  3. From the effects palette, check the checkbox that says “Knockout Group”

 

 

Perform multiple find/change (or GREP) queries at once

The find/change dialog box is a useful tool in InDesign until many searches need to be done at once. For example, an imported word processor file contains double spaces, double returns, spaces at the start of lines etc that need to be tidied. Using solely find/change, each item needs to be found and changed before the next item can be found and changed, meaning typing in the find field, then the change field, then change (or change all). This applies to GREP searches as well.

Ultimately, is there a way to perform many find/changes to text at once? Luckily, the answer is yes, there are several. Will they also change more than the text (such as formatting), not all methods outlined will do this. Some solutions listed below are still in Beta testing, while others may or may not work with Creative Cloud. Links to the providers of each solution has been provided for those seeking more information.

First method – default script (with outside assistance)

There is a script that ships with InDesign called findchangebylist.jsx. This script runs many find/change commands that are stored as text in another file called FindChangeList.txt.

By changing specific lines in the script and making and renaming copies of the FindChangeList.txt file, many different “chained searches” can be made and stored for later use.

Because the code used in the FindChangeList.txt file is rather cody, scripter Kasyan Servetsky has created a script that will take whatever is in the find/change dialog box and turn it into code that can be cut and pasted into the FindChangeList.txt file.

For regular visitors to this site, this article may seem like déjà vu, and that is because this solution has been discussed on Colecandoo before:

http://colecandoo.com/2011/08/25/make-findchange-behave-more-like-a-word-macro/

Second method – scripts:

GREP Queries Manager by Peter Kahrel

Unlike the first method, this has a user interface and deals with GREP searches rather than both GREP and find/change searches.

For full details on how it works, go to: http://www.kahrel.plus.com/indesign/grep_query_manager.html

Doquery by Mikhail Ivanyushin

Again, this has a user interface and can use find/changes or GREP searches that have been previously used and saved with the find/change dialog box.

For full details on how it works, go to: http://adobeindesign.ru/2012/10/27/doquerylist-programma-obrabotki-teksta-zaprosami/

Batch find and replace by Fabiantheblind

This solution does not have a user interface but rather works in a similar fashion to InDesign’s default script but uses Fabian’s own expression language.

For full details on how it works, go to: https://github.com/fabiantheblind/batch-find-and-replace

Kerntiff’s Xchange

This solution has a user interface and can perform many find/changes at once, whether regular find/change or GREP.

For full details on how it works, go to: http://www.kerntiff.co.uk/free-stuff/xchange-strings-xstrings

Third method – plug-ins

Automatication

This plug-in has a user interface and what the find/change dialog box in InDesign should really have shipped by default. Nevertheless it is cheaper than a slab of beer and will last much much longer.

For full details on how it works, go to: http://automatication.com/

Action Recorder (Rorohiko)

While still in the Beta stage, Rorohiko is attempting to make what is arguably missing from the InDesign menu: the Actions palette.  Other than running find/change commands, this extension allows much more chaining and automation of other non-text based tasks, but at the time of writing is still too early to tell.

For full details on how to become involved, go to: http://www.rorohiko.com/wordpress/2013/08/06/action-recorder-beta-released/

 

%d bloggers like this: