indesign - Footnotes created via script appear in a strange location -
i'm writing script handle layout , i've come across odd behaviour when creating footnotes.
whenever create footnotes script, appear before next paragraph of different style paragraph containing footnote. unless reaches end of story in case appear @ bottom of page.
i behave same way when insert footnote via menu, i.e. placing footnotes @ bottom of page.
here's before , after:
here's relevant code creates footnotes. references
array containing superscript references in text (as character
or range of character
objects). footnotes
array containing footnotes between #footnoteb
, #footnotee
tags paragraph
objects.
for (var = 0; < references.length; i++) { // create footnote newfootnote = textpara.parentstory.footnotes.add(locationoptions.before, references[i].insertionpoints[0]); // move footnote text footnote footnotes[i].move(locationoptions.after, newfootnote.insertionpoints[-1]); // remove \r @ end of footnote newfootnote.characters.item(-1).remove(); // delete leftover superscript reference references[i].remove(); }
it seems create no difference where add together footnotes, whether add together them paragraph, story or text frame, result same.
i check paragraph styles appear after footnotes paragraphstyle.spancolumntype value. i'm not sure if it's bug or feature, if paragraph spans columns footnote appear above (as if origin of new column).
through ui, can check editing paragraph style , checking span columns tab.
eta: values want in order avoid footnote placement have spancolumntypeoptions.single_column or, via ui, single column.
indesign extendscript
No comments:
Post a Comment