Welcome
Welcome to Michèle’s TagRemnants plugin, designed to detect parts and pieces of tags which may remain after all tags-based automation tasks have done their job, namely: CrossReferences, Indexes, ImageProcessing, and Footnotes.
Return to plugins section. Return to the InDesign Automation page. Return to the Home page.
For information on other plugins please go to my InDesign Automation page plugins section.
General information
Plugin name: TagRemnants
Version: 1.0.0 – 8/18/26
Fee: Free
Availability: Adobe Marketplace
Status: Work in progress
Source code in book: Adobe InDesign Automation of Nonfiction Books via JavaScript
Requirements
The TagRemnants plugin should be run if any of the following tasks use HTML-like tags, as follows:
- Cross-references – This task relies on one level plugins such as <seex>chapter or section headers</see>. The ‘x‘ is a number which defines the cross-reference format to use.
- Indexes – There are two types of indexes: page-indexes point to a page and referral-indexes point to another index entry. Both are two levels indexes in the form topic/subtopic, such as the page-index tag <idx>topics[A]subtopic</idx>. Referral-indexes are identical; replace idx with also.
- Image processing relies on two tags: image data and location tags such as <img>imgName[A]caption</idx> and image cross-reference tags such as <fig>imgName</fig>.
- Footnotes rely on two tags: footnote location tags <ftn>footnoteName</ftn> and footnote text tags <fnote>footnoteName[A]footnoteText</fnote>.
Please note that the BadTags plugin should be run first otherwise the TagRemnants plugin will detect good tags as being tag remnants, which will swamp the report if there are many tags.
What it does
Given that nonfiction books may have 2500+ indexes and many other tags (this book for example), the author will invariably make mistakes leading to tags not getting processed. Proof-reading is one way of finding them, but this raises a problem in that proof-reading is a slow meticulous process which takes time. The more mistakes there are, the more proof-read cycles need to be undertaken. Automating bad tags detection (BadTags plugin) reduces the number of proofread cycles. Yet a problem remains. Once all tag-based automation tasks have processed the document, tag parts and pieces, such as <sed2> instead of <see2> may remain. I refer to these as being tag remnants.
The TagRemnants plugin looks for parts and pieces of the following:
- Cross-references rely on <seex>Chapter or section header</see> tags. Two mishaps can invalidate the tag: the tag’s content is not a valid chapter or section header (missing or type in the name) or the tag segments contain a typo such as a missing digit or wrong digit in <seex> or a typo in the open or close segment. See Cross-references for details on how <seex> is used.
- Indexes – There are two types of indexes in the index table: page-indexes point to a page and referral-indexes point to an index entry, hence the topic/subtopic concept. Page-index tags have the format <idx>topic[A]subtopic</idx>. Referral-index tags are identical; replace idx with also. As the author inserts indexes into his/her manuscript, he/she can make all sorts of mistakes: bad open tags, bad close tags, parentheses instead of square brackets in the A separator, lower-case A separator instead of upper-case, missing A separator.. . You get the gist of it; the TagRemnants task tries to detect all of these mishaps. See Indexes for details on how <idx> and <also> are used.
- Footnotes – Two Footnote task manages footnotes via two tags: the <ftn>name</ftn> tag defines where to locate a footnote in a page. The <fnote>name[A]text</ftn> defines the footnote’s content. Again, the author, because of fatigue, may introduce ypos when defining footnotes. The one-to-one correspondence between <ftn> and <fnote> must also be checked for. See Footnotes for details on how <ftn> and <fnote> are used.
- Image Processing relies on two tags: image definition tags <img> and image cross-reference tags <fig>. Image definition tags <img>imgName[A]imgCaption</img> define where the image should be located via their position in the manuscript, the name of the image, and a caption for the image. <fig> tags direct the reader to the page where an image is located. As the author creates these, he/she may make all sorts of mistakes the TagRemnants task checks for. This task must also check that tags are well formed and that there are no incoherencies between images and tags, such as duplicate images, images which do not exist, lack of tags…
Tags, the key to automating some tasks, must be correctly formed. Any typos in a tag causes the task which relies on it to bypass it. Given that nonfiction books may have 3000+ indexes and many other tag types (my InDesign automation book for example), the author will invariably make mistakes leading to tags not getting processed. Proof-reading is one way of finding them, but this raises a problem in that proof-reading is a slow meticulous process which takes time and concentration. Tag remnants are difficult to find; it may take several proofread cycles to uncover them all. The TagRemnants plugin should uncover most of them.
Please note that a dialog box displays the HOMEDIR full path to enable the plugin user find the IndexesReadme.txt file.
For more information
You will find source code in my InDesign automation book so that you could roll your own ImageProcessing plugin.
For information on other plugins please go back to my InDesign Automation page plugins section.
Return to the InDesign automation page.