On Apr 2, 2008, at 11:56 AM, Jon Hall wrote: > I've a document with footnotes. After a footnote, CiteInPages- > numbered script begins to get the citation refs wrong. I guess it's > an applescript error... > > Are you aware of this. Do you have a fix?
Jon- You're the first to report this and it appears to be due to a Pages Applescript bug. When you ask for the offset of a string in the document (the index of the first character in the body text), Applescript returns the correct character index whether or not a footnote indicator is present (it treats the footnote indicator as a character). However, if you use that index to try to select or replace a character in the text, the character selected is incorrect if a footnote marker precedes it in the document. For example: set i to the offset of "abc" in body text as text select character i in body text ...will correctly select "a" if no footnote markers (superscripted numbers) precede it, but selects the character before "a" if one footnote marker is present in the body text before "abc." In both cases, Applescript seems to return the correct number for i (adding a footnote before "abc" correctly increments i by one), but the character selected for that index is wrong if the footnote is present. I can modify the scripts so they identify the working citations correctly (they run and create correct bibliographies), but so far I haven't been able to come up with a way to correctly replace working citations in the text with final ones. If footnotes are used, the replacement citations are shifted to the left the number of spaces as there are total digits of footnote indicators preceding the citation. This should affect all CiteInPages scripts. I can post a bug report in Apple's bug tracker, but that's unlikely to produce any benefit in the short term as the Applescript bugs I posted last fall during the main CiteInPages development are still unresolved. As a last resort, you can insert your footnotes last after formatting the document, but I understand that's no solution. Sorry I can't resolve this right now, Jim Harrison UVa ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Bibdesk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-users
