Page 1 of 1
\x0C finds footnote reference
Posted: 2008-05-18 11:43:03
by Groucho
\x0C (when using PowerFind Pro) finds both any break and footnote reference when in draft view. In Page view end of line in all footnotes is selected instead. I wrote a macro to substitute section break for every occurrence of page break, but it misbehaves when notes are around. Same behavior both in versions 1.0 and 1.1. Is that a bug or by design?
Greetings, Henry.
Posted: 2008-05-19 15:20:58
by martin
It actually only selects the last character of each footnote area, not the end of every footnote. That makes some sense, because that's where the footnotes break to the next page. However, I'd consider this undesirable behavior and will file it as a bug.
Posted: 2008-05-20 01:06:58
by Groucho
martin wrote:It actually only selects the last character of each footnote area, not the end of every footnote.
That's it, Martin. As it always is the way with me, I missed the right terms. Thanks.
Henry.
Re: \x0C finds footnote reference
Posted: 2008-06-08 09:10:07
by Kino
Groucho wrote:I wrote a macro to substitute section break for every occurrence of page break, but it misbehaves when notes are around.
To work around this, it is necessary to filter out text selections
not belonging to the body text. Something like this would do the job.
Code: Select all
Require Application Version '3.1'
Debug.setDestination 'none' # set it to 'new' or 'prompt' to see debug logs
$doc = Document.active
$text = $doc.text # body text object
Find All '\f', 'E' # find all page/section breaks
$selections = $doc.textSelections
Debug.log $selections.count
$c = $selections.count - 1
# subtract one from the total number of selections
# as the index of an array is zero based
while $c >= 0
if $selections[$c].text != $text
# if this selection does not belong to the body text...
$selections.removeValueAtIndex $c
end
$c -= 1
end
Debug.log $selections.count
foreach $sel in reversed $selections
$doc.setSelection $sel
Menu ':Insert:Section Break:Next Page'
end
I had written a similar and probably inutilely more complicated macro for the same purpose. If you are interested in it...
http://www2.odn.ne.jp/alt-quinon/files/ ... ks-nwm.zip
Re: \x0C finds footnote reference
Posted: 2008-06-09 09:18:13
by Groucho
Thanks, Kino. I was wondering whether there was a way around. Of course, this works. I didn't think of a filter. Shame on me!
Cheers, Henry