help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to renumber footnotes?


From: Emanuel Berg
Subject: Re: how to renumber footnotes?
Date: Sat, 18 Apr 2020 03:37:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Sharon Kimble wrote:

>> Yes, all tho I'm not an org-mode user, I'm pretty
>> sure it can :) Else that would be plain horrible.
>
> You're right, it is horrible! org-mode cannot
> differentiate between [fn:1] at the beginning is
> different from [fn:1] halfway through! And so with all
> the other footnotes!

I see, either its poor engineering, because why would
you enumerate the footnotes manually? This not only
makes things difficult in your use case, it also screws
things up if you want to add a footnote between say
number 4 and 5. Are you then supposed to increment every
single one of them from the old 5 (now a 6) to the total
number of footnotes?

Either that, _or_ it isn't supposed to work like that.
Instead one is to assign a unique name for each footnote
and then org-mode does enumeration when it is compiled
to a PDF or whatever, it just looks for where the
footnote is defined, if you will.

Even so (the second case), it doesn't really make sense
because then one would have to figure out names all the
time for no reason.

Instead, why not keep it all together at one place, like
in LaTeX?

This is a footnote:

    \footnote{
      This is a footnote and it appears here, where it is
      defined, and there is no other reference or definition
      to it anywhere in the document. The LaTeX to PDF
      compiler will make sure it gets the correct number
      later.
    }

And this is a reference:

    \cite[p. PAGE]{BOOK}

Anyway what you need is a regexp search for the pattern
[fn:NUMBER] and then the replace string should be the
same, only NUMBER should be NUMBER + OFFSET where OFFSET
is the number of footnotes in A. Apply this on the
region that is the old document B. But it looks like you
already got help so I'll leave it it at that...

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]