News + Events

Find out what's happening.

Posts Tagged ‘Scripting’

Title page of of the JavaScript for InDesign Book Excerpt in the April 2020 issue of InDesign Magazine. There is a short block of text, a photo of Peter Kahrel, and a shot of the book cover.

Book excerpt: JavaScript for InDesign

There are many repetitive and labour-intensive Adobe InDesign tasks that can be solved with scripting.

If you want to learn how to access Adobe InDesign’s hidden scripting riches, Peter Kahrel’s book JavaScript for InDesign is a great place to start!

Thanks to the team at InDesign Secrets, you can now download an excerpt which first appeared in the April 2020 edition of InDesign Magazine.

Title page of of the JavaScript for InDesign Book Excerpt in the April 2020 issue of InDesign Magazine. There is a short block of text, a photo of Peter Kahrel, and a shot of the book cover.

The excerpt also includes an exclusive set of simple one-liner scripts that Peter came up with to give you a quick taste of success!

Cover image for 'A typsetting treasure trove' blog post

A typesetting treasure trove

At first glance, it may not look like much—but Peter Kahrel’s extensive online repository of free scripts is an essential resource for anyone who works on long documents in InDesign.

Lines of JavaScript code overlaid on a photo of a laptop with a glowing gold light coming from the screen.
An online goldmine.

After hosting the script repository on his own website for many years, its future was in doubt late last year when Peter made the decision to relocate from the UK to Spain. His UK ISP refused to let him keep the site, or even set up redirection links.

Fortunately, David Blatner at CreativePro Network came to the rescue, and the repository now has a new home at CreativePro.com.

In this interview, Peter shares insights into the repository’s history, and some of the ways that InDesign typesetters can use his free scripts to make their lives easier.

Formatting the unformattable in InDesign

Peter Kahrel
Scripting Engineer, Typefi

In a Typefi workflow, if you want some text to automatically appear in a certain format in InDesign, you can apply that formatting as a local override or with a character style in your Word document, or encode it in an XML file.

This method of text formatting can’t be used in Typefi fields, because the composition engine doesn’t see that content. Typefi field content can contain only plain text: no formatting is possible.

However, this limitation can be overcome by including some rudimentary, HTML-like text tags in the field content and one or more GREP styles in the InDesign paragraph styles applied to the fields.

Title page of Peter Kahrel's 'Going deep with footnotes' article in the March 2017 issue of InDesign Magazine. The image shows a person in scuba diving gear ignoring the brightly-coloured fish and coral behind them to look at the ocean floor where a dictionary definition of footnotes is printed on the sand.

Going deep with footnotes

Whether you’re explaining, referencing, or elaborating, footnotes and endnotes are an invaluable design tool. However, as with every little (and big) part of a page layout, someone has to format them—and that can mean a lot of pain, particularly since InDesign’s built-in footnotes feature leaves much to be desired.

In the March 2017 InDesign Magazine article Going deep with footnotes, world-renowned scripting engineer Peter Kahrel shows you what can be achieved—from basic footnotes, endnotes, and margin notes, through to table notes and complex multiple footnote threads—with workarounds and scripts.