From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iJobF1mUJWABaQAA0tVLHw (envelope-from ) for ; Thu, 11 Feb 2021 20:32:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id +FDbElmUJWAwegAAB5/wlQ (envelope-from ) for ; Thu, 11 Feb 2021 20:32:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A4997940415 for ; Thu, 11 Feb 2021 20:32:24 +0000 (UTC) Received: from localhost ([::1]:45918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAIdT-0001iA-2U for larch@yhetil.org; Thu, 11 Feb 2021 15:32:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAIHw-0002h5-Gb for Emacs-orgmode@gnu.org; Thu, 11 Feb 2021 15:10:09 -0500 Received: from mailer-211-145.hitrost.net ([91.185.211.145]:61050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAIHs-00031u-VQ for Emacs-orgmode@gnu.org; Thu, 11 Feb 2021 15:10:08 -0500 Received: from lk.84.20.244.182.dc.cable.static.lj-kabel.net ([84.20.244.182] helo=Tauriel) by b1.hitrost.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1lAIHm-004H0e-LF; Thu, 11 Feb 2021 21:09:58 +0100 References: User-agent: mu4e 0.9.19; emacs 25.3.2 From: Christian Moe To: arozbiz@gmail.com Subject: Re: How to combine two org files that each have footnotes? In-reply-to: Date: Thu, 11 Feb 2021 21:05:35 +0100 Message-ID: <87czx6wesw.fsf@christianmoe.com> MIME-Version: 1.0 Content-Type: text/plain X-GeoIP: Country [IP], SI [84.20.244.182] X-Antivirus-Scanner: Clean mail though you should still use an Antivirus Received-SPF: pass client-ip=91.185.211.145; envelope-from=mail@christianmoe.com; helo=mailer-211-145.hitrost.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: A4997940415 X-Spam-Score: -1.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: jw6dv6TUv+XE 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