• Global community
    • Language:
      • Deutsch
      • English
      • Espaรฑol
      • Franรงais
      • Portuguรชs
  • ๆ—ฅๆœฌ่ชžใ‚ณใƒŸใƒฅใƒ‹ใƒ†ใ‚ฃ
    Dedicated community for Japanese speakers
  • ํ•œ๊ตญ ์ปค๋ฎค๋‹ˆํ‹ฐ
    Dedicated community for Korean speakers
Exit
0

Table footnotes

Community Expert ,
Jun 20, 2013 Jun 20, 2013

Copy link to clipboard

Copied

Hello friends,

Obiously table footnotes are not the same objects as footnotes (in text flows). They are not found with the script as described in my post message/5430068#5430068. They are also flows (I assume this from the ยง symbol at their end).

How to access these table footnotes? I have found only properties for their format, for example TblFnNumStyle, TblFnCellPosition or TblFnSuffix).

There is no such constant as FTI_tblfnโ€ฆ.

I welcome Your ideas.

Klaus

TOPICS
Scripting

Views

685

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2013 Jun 20, 2013

Copy link to clipboard

Copied

Hi Klaus, There is no special table footnote object in FrameMaker. There are two ways to get to table footnotes:

1) Loop through all of the document's Fn objects.

var doc = app.ActiveDoc;

var fn = doc.FirstFnInDoc;

while (fn.ObjectValid()) {

  // ... Do something here.

  fn = fn.NextFnInDoc;

}

This is the simplest method, but the internal list may not be in document order.

2) Process the paragraphs in document order, and for each paragraph, get a list of footnote anchor objects. I don't have time to code this in ExtendScript, but here is how it looks with FrameScript:

Set oPgf = TextSelection.Begin.Object;

Get TextList InObject(oPgf) FnAnchor NewVar(tTextList);

Loop While(i <= tTextList.Count) LoopVar(i) Init(1) Incr(1)

  Set oFn = tTextList.TextData;

  // Do something with the footnote here.

EndLoop

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2013 Jun 20, 2013

Copy link to clipboard

Copied

Rick,

The first method would be my favour (it is elegant), but it continues after the last table-footnote with the first normal footnote - thus creating a 'loop'.

I have not yet found a method to stop that loop. My first attempt fails:

function ProcessFootnote (doc) {
// find citations in footnotes
     var fnText = "";
     var fn = doc.FirstFnInDoc;

     while (fn.ObjectValid()) {
       fnText = (GetText(fn));
          alert (fnText);                    // the text of the footnote
          var citations = GetTempCitations (fnText);        fn = fn.NextFnInDoc;        if (fn == doc.FirstFnInDoc) {             return;                           // ------- Does not stop the loop, === doesn't it either        }      } } //--------------------------------------------------------------------------

PS will be absent for some days from this project.

Klaus

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 02, 2013 Jul 02, 2013

Copy link to clipboard

Copied

LATEST

This has been solved by Rick's answer to my post "Getting text from footnote".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines