Welcome
Welcome to Michèle’s BadTags plugin, designed to detect automation tags which contain typos. Such tags, referred to as bad tags, will not be processed by the corresponding automation tasks: 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: BadTags
Version: 1.0.0 – 8/18/26
Fee: Free
Availability: Adobe Marketplace
Status: Not yet published
Source code in book: Adobe InDesign Automation of Nonfiction Books via JavaScript
Requirements
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 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 reduces the number of proofread cycles.The BadTags plugin is limited to the following four automation tasks which rely on HTML-like tags: Cross-references, Indexes, Footnotes and Image Processing.
Bad tags mean misspelled HTML-like tags used by four of the eleven plugins presented in the InDesign automation page: Cross-references, Indexes, Footnotes and Image Processing. Details as to how to use the tags are presented in the respective plugin pages. You will find below the tags which each plugin relies on:
- 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>.
You will find below details as to mistakes which the author could make when creating tags.
What it does
Four automation tasks rely on HTML-like tags: Cross-references, Indexes, Footnotes and Image Processing. InDesign searches for tags; if they contain a type, it bypasses them. The tags InDesign searches for according to the task follow:
- 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 BadTags 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 BadTags 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 2500+ 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. The more mistakes there are, the more proof-read cycles need to be undertaken. Automating bad tags detection reduces the number of proofread cycles.
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.