🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17470

Re: A simple footnote model

#17470
From: johannes
Date: Thu, 05 Jun 2003 15:14
116 lines
4918 bytes
Hi,

i was planning the same thing (nearly) when i read your article.

My Idea was:
1. having 2 Text Threads - one with text one with footnotes
2. my documents got 3 columns per page - under first col with foot
note ref first footnote frame is placed, then resized that only
footnotes for that col remain, next footnoteframe again whrer next ref
appears and so on

problem: what if placing a footnoteframe (with textwrap) ono textframe
makes the ref flowing onto next col, and moving footnote under next
col makes ref appearing in prevoius textframe again? (maybe just
ignore that?)

3. my idea for numbering is to kreate two xml nodes - the one for text
body and another for footNotes,

so there can be a doc like
<doc>
<text>
Blahh<footnoteRef id="a">1</footnoteRef> Blah Blah 
and so<footnoteRef id="b">2</footnoteRef> on
</text>
<footnotes>
  <footnote id="a">
    <number>1</number>
    <footnoteText>Foo</footnoteText>
  </footnote>
  <footnote id="b">
    <number>2</number>
    <footnoteText>Bar</footnoteText>
  </footnote>
</footnotes>
</doc>

now, for renumbering all footnoterefs from text in appearing order
from text to array(id)(number), iterate through array an reset
numbers, write back contents to xml, and syncronize with footnote
thread

further there could be a script, thet asks for selecting place to fill
in footnote, then asks for the footnotetext to fill into a text field,
and tagging an renumbering gets done automatically...

what di you think about that?
maybe i'll just try that tomorrow...


when something is added it needs to be tagged that takes mor time - so
maybee this is stupid?


greetings

johannes






"Guy Verville" <taddeus@spamcop.net> wrote in message news:<1de95549.4@WebX.la2eafNXanI>...
> Again me.
> 
> Cycling through pages remove the previous problem. Now, I must find a way to taking into account the relative positions of the foonotes call if, for example, they are made from numerous text frames.
> 
> Sub RenumberFootnotesIndesign()
>     Dim i, j, k, starteur, starteur2 As Integer
>     Const AppelNote = "AppelNote"
>     Const ChiffreNote = "ChiffreNote"
>     Dim test, test1 As Variant
>     Set myindesign = CreateObject("InDesign.Application.2.0")
>     Set mydoc = myindesign.ActiveDocument
>     ' clears find preferences
>     myindesign.FindPreferences = idNothing
>     myindesign.ChangePreferences = idNothing
> 
> ' checks if "AppelNote" or "ChiffreNote" exists. AppelNote is the name of the characteur style
>     ' I use to place my footnote number in text
>      If mydoc.CharStyles.Count > 0 Then
>         For i = 1 To mydoc.CharStyles.Count
>             Select Case mydoc.CharStyles.Item(i)
>                 Case Is = AppelNote: j = 1
>                 Case Is = ChiffreNote: k = 1
>             End Select
>         Next i
>     End If
>     If j = 0 Or k = 0 Then MsgBox "Please make sure you have the necessary CharacterStyle set in your pub.": End
> 
> 'Loops through the pages
>     For k = 1 To mydoc.Pages.Count
>         Set mypage = mydoc.Pages.Item(k)
>         ' Loops the Textframes
>         For j = 1 To mypage.TextFrames.Count
>             Set myTSRs = mypage.TextFrames.Item(j).TextStyleRanges
>             ' Loops through the TextStyleRanges
>             For i = 1 To myTSRs.Count
>                 'Finds "AppelNote" and "ChiffreNote"
>                 With myTSRs.Item(i)
>                     'test = .CharacterStyle
>                     Select Case .CharacterStyle
>                         Case Is = AppelNote
>                             starteur = starteur + 1
>                             .TextContents = LTrim$(starteur)
>                         Case Is = ChiffreNote
>                             starteur2 = starteur2 + 1
>                             .TextContents = LTrim$(starteur2)
>                     End Select
>                 End With
>             Next i
>         Next j
>     Next k
>     MsgBox "Finish"
> End Sub
Technical Details
Message-ID: <e553fe8f.0306050714.6f208f20@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
References: <1de95549.-1@WebX.la2eafNXanI> <1de95549.4@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,aa16bd12e0e1253e
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-05 08:14:20 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: johannesbuchmann@hotmail.com (johannes)
Newsgroups: adobe.scripting.indesign
Subject: Re: A simple footnote model
Date: 5 Jun 2003 08:14:19 -0700
Organization: http://groups.google.com/
Lines: 116
Message-ID: <e553fe8f.0306050714.6f208f20@posting.google.com>
References: <1de95549.-1@WebX.la2eafNXanI> <1de95549.4@WebX.la2eafNXanI>
NNTP-Posting-Host: 192.129.25.10
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1054826059 23875 127.0.0.1 (5 Jun 2003 15:14:19 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 5 Jun 2003 15:14:19 GMT