* How to combine two org files that each have footnotes?
@ 2021-02-11 17:49 arozbiz
2021-02-11 18:26 ` Russell Adams
2021-02-11 20:05 ` Christian Moe
0 siblings, 2 replies; 5+ messages in thread
From: arozbiz @ 2021-02-11 17:49 UTC (permalink / raw)
To: Emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
Most of my writing is academic and involves lots of footnotes. Sometimes it
is useful to be able to combine two separate files, each of which have
footnotes. How do I do so in a way that automatically renumbers the
footnotes in the file that comes second?
More specifically, I have file1.org and file2.org, and each of them have
three footnotes ([fn:1], [fn:2], and [fn:3]). I want to create file3.org,
which simply merges file1.org and file2.org, with the contents of file2.org
coming after the contents of file1.org. The problem is that the footnote
calls ([fn:#]) in the file2 section will end up pointing the file1
footnotes. What I really want is to automatically renumber all the
footnotes [fn:1]...[fn:6], but I don't know how to do this, given that org
permits multiple footnote calls to the same footnote.
Thanks,
Alan
[-- Attachment #2: Type: text/html, Size: 1131 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine two org files that each have footnotes?
2021-02-11 17:49 How to combine two org files that each have footnotes? arozbiz
@ 2021-02-11 18:26 ` Russell Adams
2021-02-11 20:05 ` Christian Moe
1 sibling, 0 replies; 5+ messages in thread
From: Russell Adams @ 2021-02-11 18:26 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Feb 11, 2021 at 11:49:32AM -0600, arozbiz@gmail.com wrote:
> Most of my writing is academic and involves lots of footnotes. Sometimes it
> is useful to be able to combine two separate files, each of which have
> footnotes. How do I do so in a way that automatically renumbers the
> footnotes in the file that comes second?
>
> More specifically, I have file1.org and file2.org, and each of them have
> three footnotes ([fn:1], [fn:2], and [fn:3]). I want to create file3.org,
> which simply merges file1.org and file2.org, with the contents of file2.org
> coming after the contents of file1.org. The problem is that the footnote
> calls ([fn:#]) in the file2 section will end up pointing the file1
> footnotes. What I really want is to automatically renumber all the
> footnotes [fn:1]...[fn:6], but I don't know how to do this, given that org
> permits multiple footnote calls to the same footnote.
Is this a case where bibliographic tools like Bibtex come into play?
Would "anonymous" footnotes help, then Org can dynamically number them?
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine two org files that each have footnotes?
2021-02-11 17:49 How to combine two org files that each have footnotes? arozbiz
2021-02-11 18:26 ` Russell Adams
@ 2021-02-11 20:05 ` Christian Moe
2021-02-11 23:54 ` Kyle Meyer
1 sibling, 1 reply; 5+ messages in thread
From: Christian Moe @ 2021-02-11 20:05 UTC (permalink / raw)
To: arozbiz; +Cc: Emacs-orgmode
Hi,
This is actually easy because Org allows named footnotes (numbers are
really just a special case of names).
Make backup copies of your files for safety's sake, then visit file1.org
and M-% to replace all instances of "fn:" with (for example)
"fn:file1_". The footnotes will now be named fn:file1_1, fn:file1_2,
etc. At this point all your footnotes across the two documents are
already uniquely named (but you can of course also do the corresponding
thing to file2 if you like). Merge away.
Yours,
Christian
arozbiz@gmail.com writes:
> Most of my writing is academic and involves lots of footnotes. Sometimes it
> is useful to be able to combine two separate files, each of which have
> footnotes. How do I do so in a way that automatically renumbers the
> footnotes in the file that comes second?
>
> More specifically, I have file1.org and file2.org, and each of them have
> three footnotes ([fn:1], [fn:2], and [fn:3]). I want to create file3.org,
> which simply merges file1.org and file2.org, with the contents of file2.org
> coming after the contents of file1.org. The problem is that the footnote
> calls ([fn:#]) in the file2 section will end up pointing the file1
> footnotes. What I really want is to automatically renumber all the
> footnotes [fn:1]...[fn:6], but I don't know how to do this, given that org
> permits multiple footnote calls to the same footnote.
>
> Thanks,
> Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine two org files that each have footnotes?
2021-02-11 20:05 ` Christian Moe
@ 2021-02-11 23:54 ` Kyle Meyer
2021-02-14 0:03 ` arozbiz
0 siblings, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2021-02-11 23:54 UTC (permalink / raw)
To: Christian Moe, arozbiz; +Cc: Emacs-orgmode
Christian Moe writes:
> Hi,
>
> This is actually easy because Org allows named footnotes (numbers are
> really just a special case of names).
>
> Make backup copies of your files for safety's sake, then visit file1.org
> and M-% to replace all instances of "fn:" with (for example)
> "fn:file1_". The footnotes will now be named fn:file1_1, fn:file1_2,
> etc. At this point all your footnotes across the two documents are
> already uniquely named (but you can of course also do the corresponding
> thing to file2 if you like). Merge away.
Yeah, that's the main method I can think of too
(<https://orgmode.org/list/87imi9iim3.fsf@kyleam.com>). And after
merging, you can convert the references back to numbers by normalizing
with 'C-c C-x f n' if you'd like (and assuming what I wrote at the above
thread is correct).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine two org files that each have footnotes?
2021-02-11 23:54 ` Kyle Meyer
@ 2021-02-14 0:03 ` arozbiz
0 siblings, 0 replies; 5+ messages in thread
From: arozbiz @ 2021-02-14 0:03 UTC (permalink / raw)
To: Kyle Meyer; +Cc: Emacs-orgmode, Christian Moe
[-- Attachment #1: Type: text/plain, Size: 34 bytes --]
Brilliant. Thank you both!
-Alan
[-- Attachment #2: Type: text/html, Size: 110 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-14 0:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-11 17:49 How to combine two org files that each have footnotes? arozbiz
2021-02-11 18:26 ` Russell Adams
2021-02-11 20:05 ` Christian Moe
2021-02-11 23:54 ` Kyle Meyer
2021-02-14 0:03 ` arozbiz
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).