Welcome to the Adobe InDesign Automation of Nonfiction Books via JavaScript book and plugins page. It contains two sections: my Adobe InDesign Automation of Nonfiction Books via JavaScript book and Automation plugins. Before continuing, please note that I assume that the author creates a manuscript via an authoring tool such as Word. There are other authoring tools, the problem is that they are less InDesign compatible. I have tested all my scripts in a Windows 10 environment, they should should also work in a Mac, however I have not tested them. So, download free plugins and run on Mac at your own risk. Please do not buy any of my plugins to run on a Mac. You may do so at your own risk; I shall not provide any tech support on them.
Also, please note the usual terms of use as outlined in my book and in the Adobe Marketplace plugin descriptions.
Adobe InDesign Automation of Nonfiction Books via JavaScript book
You will find below details on my book Adobe InDesign Automation of Nonfiction Books via JavaScript. It will be published via Amazon on August 18th, 2026. It is a rather comprehensive book which aims to provide the programmer the know-how to automate nonfiction book, namely: document statistics, cross-references, indexes, footnotes, image positioning including captions and image cross-references, top-of page inserts, blank pages, and chapter first paragraphs. These automation tasks are available as plugins via the Adobe Marketplace, or, you could roll your own via the code provided in my book cited above.
My Adobe InDesign Automation of Nonfiction Books via JavaScript book stems from my writing two books on avoiding excessive C++ debugging time when creating my Arduino-based beehive weighing system. As I wrote these first two books, I quickly recognized the need for exhaustive cross-references and indexes. Each has 2500+ indexes and 500+ cross-references. Inserting these manually into InDesign was not an option, too time consuming thereby too expensive. Since I had to somehow embed cross-references and indexes into the manuscript so that the InDesign user could create corresponding InDesign cross-references and indexes, why not do so in such a way that the process could be automated. I came up with an HTML-like tags solution. Two JavaScript scripts, one to handle cross-references and a second one to handle indexes, scan the imported document for tags and create the appropriate InDesign equivalents. These scripts eliminated corresponding InDesign costs thereby freeing me to insert cross-references and indexes to my heart’s content.
The experience acquired from developing these first two automation solutions led me to develop other InDesign time-saving tasks: footnotes, images, top-of-page inserts, chapter titles, and more.
This book elaborates on the hows and whys of these automation tasks. The onus of content is on the author; the InDesign user concentrates on typography, layout and aesthetics. Automation, the How? of this book, alleviates the InDesign user from the burden of repeated tedious tasks. It is the programmer’s job.
As I started writing my books, I was quickly faced with three issues: How to define cross-references and indexes, How does the author convey these to the InDesign user and How to automate these, as follows:
- How to define cross-references and indexes – The easiest approach to defining cross-references and indexes lies in creating HTML-like tags such as
<idx>Roses[A]Pruning</idx>
The above is a two level tag which a regular expression finds and parses into two components: a topic and a subtopic. The Indexes task uses these to create the InDesign entries. The result is an index entry which looks as follows
Roses
Pruning 77 - How does the author convey cross-references and indexes to the InDesign user so that he/she can create corresponding InDesign equivalents? The author inserts cross-reference and index tags as described above. The InDesign user extracts data from the tags to create InDesign equivalents. Given that my books have 2500+ indexes, doing so manually is not an option. Automation to the rescue, indexes get created automatically.
- How to automate cross-references, indexes, images and footnotes – The key to tag-based automation lies in using regular expressions to find and parse HTML-like tags and provide the JavaScript script with the data which enables it to get the job done. The task is a two-phases process: 1 – Create an array of tags via a regular expression search and 2 – Cycle through the array to extract topic/subtopic pairs and create index entries.
The tags solution described above works. Given that my book contains 500+ cross-references, 2500+ indexes, 30+ footnotes, and 50+ images, JavaScript enabled me doing programmatically what the InDesign user was burdened with. The real issue is a tradeoff between programming time vs InDesign user time saved and other benefits derived from automation, such as consulting fees, plugin sales, training, better author/InDesign user interchange, etc. Many tasks do not merit automation as programming them does not warrant the InDesign time saved. But some do! This book covers eleven such tasks as itemized by the plugins described below.
In a nutshell, this book covers how to automate InDesign to cost-effectively convert Word manuscripts into ready-to-publish nonfiction books. Getting the job done requires that the JavaScript programmer should:
- Recognize InDesign tasks which are labor intensive.
- Learn enough InDesign to understand what needs to be done to accomplish objectives.
- Learn enough JavaScript to get the job done.
- Master the DOM (Document Object Model) classes sufficiently to automate InDesign tasks.
- Learn how to use the Adobe tools to manage scripts and/or plugins: the ESTK (ExtendScript Toolkit) and the UDT (UXP Developer Tool).
- Learn why VS Code is probably the best tool to edit JavaScript code with.
- Learn how to create regular expressions as these enable searching for HTML-like tags and selectively extract content.
These seven domains are covered in my Adobe InDesign Automation of Nonfiction Books via JavaScript book. My objective when defining the book’s content is that a programmer should find in this all-in-one book all he/she needs to master to automate InDesign within the context of nonfiction books. The result is a rather massive door-stopper book available in Kindle, paperback and hardcover formats.
Automation plugins
If you do indeed encounter significant costs converting a nonfiction book manuscript into a read-to-publish book, you need not necessarily roll your own scripts to automate InDesign; some of the plugins listed below may respond to some of your needs. Here is the list of plugins I have created: Please bear in mind that their release and improvement is an ongoing process. They will be progressively available via the Adobe Marketplace.
- DocStats – Free – Release programmed for August 18th, 2026 – The DocStats plugin provides document metrics: number of characters, paragraphs, images, footnotes, swatches, index tags, etc. It is an unassuming little program which quantifies a document.
- BadTags – Free – Release pending – Four of my automation tags rely on HTML-like tags. The BadTags plugin detects malformed tags thereby providing the author with the means to correct them.
- Cross-References – Fee $99,99 – Release pending – The author may want to refer the reader to some other place in his/her book; cross-reference tags free him/her from InDesign cost constraints. They are easy to create and maintain. And if the author makes mistakes, the BadTags task above uncovers these.
- Indexes – Fee $99,99 – Release pending – My motto: If it is in the book, you should find it through the index table. I have often been frustrated trying to find something in a technical book which I am sure is there. The problem is that the author did not take the time to create a thorough index table or found that inserting indexes as needed entailed a prohibitive InDesign user cost. Any technical, history, biography… book worth its mettle should have an extensive index table but creating these can prove expensive. The mechanisms I created make it extremely easy for the author to create and maintain indexes, for the programmer to create scripts to process them, and for the InDesign user to transform these into InDesign equivalents at practically zero cost. Please note that Word indexes are InDesign compatible. IMHO, creating them via tags is a lot more practical and maintainable.
- Footnotes – Fee $49,99 – Release pending – Footnotes enable the author to insert comments in the middle of a paragraph without breaking the narrative. Using HTML-like tags to create footnotes turned out to be easy for both the author and the programmer. Although Word footnotes are InDesign compatible, as for indexes, footnote tags are a lot more practical, less error-prone and maintainable than inserting footnotes directly into the Word document.
- ImageProcessing – Fee $199,99 – Release pending – The ImageProcessing plugin is a two-tasks process: It first moves all images out of the way into a repository. The InDesign user then launches other automation tasks knowing that images will not interfere with document reflow. When close to finalizing InDesign work, the InDesign user can then launch the second image processing subtask: It adds captions to the bottom of images, joins them as an InDesign group, and moves the image/caption groups to their destination pages. The InDesign user finalizes the process by fine tuning image positioning.
- TopOfPage Inserts – Free – Release pending – A book should contain top-of-page inserts which inform the reader where he/she is at in the book. This task may be launched time and again whenever the InDesign user tweaks the document in ways which cause pages to shuffle around.
- BlankPages – Free – Release pending – Blank pages should not be anonymous empty pages. They should contain text informing the reader that the page is intentionally blank. Better still, empty pages could be endowed with designs or images whose contents depend on the nature of the next chapter; this is an idea which needs further work.
- ChapterTitles – Free – Release pending – There are two types of chapters, numbered ones and unnumbered ones such as Prefaces. I chose to spread numbered chapters titles into two lines, as follows:
Chapter 10
Image processing
The author need not be burdened with details as to how to accomplish this; the ChapterTitles task does this automatically. - ChapterFirstParagraphs – Free – Release pending – I chose to start the first paragraph of a chapter with drop caps. This plugin runs through the entire book to ensure that the only paragraphs to be drop-capped are the chapters’ first ones.
- DoAll – Fee $299,99 – Release pending – Converting a nonfiction book, such as my C++ and InDesign automation books requires applying all of the tasks enumerated above in a certain order. Doing so one task at a time is feasible but too time consuming and error prone. I consequently created a task which assembles all tasks into one DoAll task. The overall author/InDesign user workflow reduces to: Load the Word manuscript into InDesign; Launch the DoAll task; The InDesign user reviews the document superficially for blatant problems then submits a .pdf of the book to the author; The author modifies his/her manuscript; The InDesign user reimports the manuscript for another process/review/reimport round. When the the author finally gets the book’s contents in a ready-to-publish condition, the InDesign user fine tunes image positioning and looks for typographical flaws. The outcome is an extremely fast round-robin exchange between the author and the InDesign user. The end product, such as my InDesign automation book, is a cost effective professionally typeset book.
I shall attempt to release all plugins as soon as possible. It is a tall order, but the going looks promising. The book is scheduled for an August 18th, 2026 release. I should also be releasing some of the free plugins.
If you have questions concerning the plugins or the book, please contact me, Michèle Delsol, at InDesign@md-dsl.fr.