Hi, Attached is a patch that enables footnotes in INCLUDEd documents when using :lines and friends. It stores the footnotes in a hash-table initialized in `org-export-expand-include-keyword' and updated via `org-export--prepare-file-contents'. The footnotes are then inserted when all include keywords are expanded. At the moment only footnotes from INCLUDEs with :lines-like arguments will be picket up here. But I think it might be nice to also use this functionality with footnotes when whole documents are included, and not include the footnote section directly from these documents. Though I expect the to be accused of worm-nurturing, do consider this curious example: $> cat t{1,0*}.org #+TITLE: This is t1.org #+INCLUDE: "/tmp/t00.org" #+INCLUDE: "/tmp/t01.org" # This is t00.org Footnotes[fn:1], [fn:test] and [fn:inline:anonymous footnote]. * Footnotes [fn:1] Footnote 1 [fn:test] Footnote "test" # t01.org Footnotes[fn:1], [fn:test] and [fn:inline:anonymous footnote]. * Footnotes [fn:1] Footnote 1 [fn:test] Footnote "test" ox will in fact interpret t1.org as: #+TITLE: This is t1.org Footnotes[fn:1-1], [fn:1-test] and [fn:1-inline:anonymous footnote]. [fn:1-1] Footnote 1 [fn:1-test] Footnote "test" Footnotes[fn:2-1], [fn:2-test] and [fn:2-inline:anonymous footnote]. So I see three approaches: 1. let the user shoot himself in the foot 2. fix the "bug" (IMO) that is that #+INCLUDE: "/tmp/t00.org" #+INCLUDE: "/tmp/t01.org" Is "read" as #+INCLUDE: "/tmp/t00.org" :minlevel N #+INCLUDE: "/tmp/t01.org" :minlevel N+1 The easiest way I can think of would be to do a pre-scan of the buffer to see if there exists any instances where include is only separated by whitespace in which case they should have the same level. 3. Fix the particular nastiness above by removing footnote sections and reinserting them using the mechanism of this patch. —Rasmus -- A page of history is worth a volume of logic