Quick and Dirty comb-style forms using GREP Styles

I was recently asked to assist with the creation of a large amount of forms that were intended for a print output. The forms themselves were a “boxy” format that also had comb-style fields to indicate how many letters each area of the form should be.

combgrep1

The challenge with this particular brief was how to prepare the forms not only before the deadline, but so that they were also uniform in appearance. The solution was to create a paragraph style that had four GREP styles that would assign parts of the form, namely:

  • The start or end of the form
  • A letter space
  • A small comb
  • A large comb

Each part of the form is a monospaced font such as Courier New that has no fill or stroke, but has an underline and strikethrough that go to making the appearance. Take the following example that shows the style that represents the letter space:

combgrep2

The character styles that represent the start/stop lines or the small/large comb fields are effectively the same, but the horizontal scale is reduced to 3% and the underline and strikethrough options are changed to show different amounts of white (or none at all).

To make the form appear, characters that would not generally be used within the form are used to activate the GREP styles. For example, the pipe symbol will not be used in the form details, so this can be used for a start/end of form. Here is a list of the GREP substitutions made in this example:

  • | = start/end of box
  • ^ = white space
  • ` = small comb
  • © = large comb.

combgrep3

The following illustration shows the GREP styles in use, how a form would appear, and then how the text appears in the story editor.

combgrep4

There are several advantages of using this method to quickly make comb style forms, such as consistent sizing in forms, or easy to copy and paste portions of a form within a document.

However, there is a significant down-side to this method of form construction, namely that it is for print purposes only. While the forms can be created quickly for a print publication, the form fields do not translate that well to interactive forms via Adobe Acrobat using Acrobat’s Identify Form Fields feature.

combgrep5

 

Advertisements

Another use for FF Chartwell: Plotting X and Y coordinates

The chartwell font is a unique font that uses ligatures and stylistic sets to create both percentile graphs (such as pie graphs) as well as bar graphs. More information on the font can be found here.

Using this font solves an ongoing issue for users of Data Merge within InDesign: how to create variable graphs or charts using the data in the linked text file only. First suggested by David Blatner’s InDesignSecrets piece, the last Colecandoo blogpost examined some “hacks” to further improve on the font in creating variable graphs or charts

There is a particular font in this family called Chartwell Bars that has a distinct advantage over the others in the family and that is that, when utilising the stylistic set, the font can represent whole values between 1-1000, whereas all other fonts in the family will represent only whole values between 1-100.

However, an unintended and alternative use for Chartwell Bars makes it perfect for plotting X and Y coordinates for producing variable results. To demonstrate how, take the following example of a blood pressure chart that is part of a data merge that contains two fields – the X and Y axis of the chart.

Using a combination of Data Merge, Anchored Objects and the “no fill, no stroke” trick (demonstrated on this blog before) to the Chartwell Bars font, the “your result” callout is able to move in two dimensions according to the result of the Data Merge.

montageTo show how this works, it is perhaps best demonstrated by showing the textframe that contains the “your result” callout that is an anchored object. The type that has no fill or stroke has been coloured black so it is clear how the trick works.

trickrevealedIf preparing a one-off chart, obviously placing the “your result” callout would be far easier and faster than the trick demonstrated, but if preparing hundreds or thousands of charts as part of a data merge, this trick is certainly worthwhile.

A PDF demonstrating the proof of principle can be found here. Unlike other PDFs available for download from Colecandoo, this does not contain working files within the PDF due to licencing restrictions of the font.

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”

 

 

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.

%d bloggers like this: