Footnotes again

I have a group “thesis” containing groups (chapter 1, chapter 2, etc). Each chapter contains several “content” rich text files ordered by comment, where comment contains 100, 200, 300 etc. The last rich text file in each chapter is called “footnotes”. In the content files, I simply create a superscript marker F1, F2, F3 etc and then add the text in the footnote file as F1footnote textF2 etc.

Now, exporting to RTF creates a perfect document with endnotes. Numbering obviously is not automatic, but as long as the correspondence from the content files to the footnote file is correct, that is OK.

My question: does anyone know how I could parse the newly created single rich text file to turn my endnotes into true footnotes, for formatting in Pages? or any other word processor? I realise this is not truly a DT question, but I think if this could be worked out, it would help a lot of DT academic users.



RTF specification:
Document formatting:
Section formatting:
Special characters:

With a little messing, I found that I can easily create footnotes in rich text documents by replacing my (F1), (F2) footnote markers with the text from the F1, F2 footnote content at the end of the document. RTF footnote format is:

{\chftn{\footnote {Footnote text}}}

If I open this in NeoOffice, I have perfect footnotes (but not in Pages 1.0). But, I have yet to work out how to properly format the footnote itself, and in particular, the number of the footnote shown at the bottom of the page.

Now, automating this would require:

  1. open rtf file exported from DT
  2. get every instance of (Fn) in the text (where n=number)
  3. get every instance of a line starting with Fn
  4. replace each instance of (Fn) with the corresponding Fn text, formatted as{\chftn{\footnote {Fn text}}}
  5. remove all lines found in (3)
  6. save as rtf file

I could see this as an Automator action to be supplied with DT Pro. Anyone able to help out here? :smiley:


Can’t help one bit, but would love to see something like this occuring. Best of luck.


DONE. This script will ask where to save the selected record, then convert as you described above. Place it in ~/Library/Application Support/DEVONthink Pro/

Download the script from:

Has anyone tried this in Mellel? Importing RTF text with footnotes from scrivener works, but I can’t get it to work with the rtf files DT exports.
Any Ideas?