I'm trying to remove bold and italic styling from footnote references in an InDesign document using ExtendScript. By footnote references, I mean the little number that appears in the main text. That is, I want to strip the italic and boldness from that little number, not from the actual footnote. Here is my attempt. It does exactly the opposite of what I want, meaning it strips the actual footnote from its italic and boldness, but does not strip the little number in the main text.
var document = app.activeDocument,
stories = document.stories,
nbStories = stories.length,
story,
footnotes,
nbFootnotes,
footnote,
texts,
nbTexts,
text,
i,
j,
k;
for (i = 0; i < nbStories; i += 1) {
story = stories[i];
footnotes = story.footnotes;
nbFootnotes = footnotes.length;
for (j = 0; j < nbFootnotes; j += 1) {
footnote = footnotes[j];
texts = footnote.texts;
nbTexts = texts.length;
for (k = 0; k < nbTexts; k += 1) {
text = texts[k];
text.fontStyle = "Regular";
}
}
}
How can I achieve exactly the opposite? (i.e strip only the little number in the main text but not the actual footnote)