emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Sharon Kimble <boudiccas@skimble.plus.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-footnote renumbering
Date: Thu, 09 Apr 2020 00:54:28 +0000	[thread overview]
Message-ID: <87imi9iim3.fsf@kyleam.com> (raw)
In-Reply-To: <87o8s2xrdk.fsf@skimble.plus.com>

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> I'm using 'C-u C-c C-x f r' and it isn't changing the footnote
> numbering! I am adding file-2 to file-1 and then using the key mantra,
> but the footnotes are not changing. In file-1 the last footnote is 756,
> and in file-2 the first footnote is 670 (I've no idea why it suddenly
> starts at 670, but it does.)

Hopefully someone will correct me if I'm mistaken, but I don't think
renumbering will help in the situation you describe.  If you're
concatenating two files with overlapping footnotes, I don't see how Org
would know which reference belongs to which definition.

My understanding is that renumbering is useful in cases where the
references are no longer an ordered, unbroken sequence.  Say you have
this file:

--8<---------------cut here---------------start------------->8---
Pellentesque dapibus.  Aliquam feugiat [fn:1] tellus.  Nulla
facilisis.  Phasellus in [fn:2].

* Footnotes

[fn:1] Vel tortor sodales tellus ultricies commodo.

[fn:2] Proin quam nisl, tincidunt.
--8<---------------cut here---------------end--------------->8---

With point after "Nulla", you insert a footnote ('C-c C-x f'):

--8<---------------cut here---------------start------------->8---
Pellentesque dapibus.  Aliquam feugiat [fn:1] tellus.  Nulla [fn:3]
facilisis.  Phasellus in [fn:2].

* Footnotes

[fn:3] Nullam libero mauris.

[fn:1] Vel tortor sodales tellus ultricies commodo.

[fn:2] Proin quam nisl, tincidunt.
--8<---------------cut here---------------end--------------->8---

By default, the numbering isn't auto-adjusted.  This is where
renumbering with 'C-u C-c C-x f r' comes in.  Calling that gives:

--8<---------------cut here---------------start------------->8---
Pellentesque dapibus.  Aliquam feugiat [fn:1] tellus.  Nulla [fn:2]
facilisis.  Phasellus in [fn:3].

* Footnotes

[fn:2] Nullam libero mauris.

[fn:1] Vel tortor sodales tellus ultricies commodo.

[fn:3] Proin quam nisl, tincidunt.
--8<---------------cut here---------------end--------------->8---


Back to your problem of combining files.  My approach would be

  * Do a regexp search in file A and replace all "[fn:N]" with
    "[fn:aN]", making them named references.

    Repeat with file B, creating "[fn:bN]" references.

  * Combine file A and file B.  Then convert the references into numbers
    by normalizing with 'C-c C-x f n'.

But perhaps others can suggest a better solution.


      reply	other threads:[~2020-04-09  0:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 14:28 org-footnote renumbering Sharon Kimble
2020-04-07 21:46 ` Kyle Meyer
2020-04-08  9:23   ` Sharon Kimble
2020-04-09  0:54     ` Kyle Meyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imi9iim3.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=boudiccas@skimble.plus.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).