From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leonard Randall Subject: Re: Multiple footnote references in included file Date: Mon, 7 Sep 2015 15:54:35 +0100 Message-ID: References: <87vbbni9i1.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04427204871554051f296d5a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxoc-00044a-8u for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 10:54:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxoa-0004Rl-LX for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 10:54:38 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:36100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxoa-0004Qq-CA for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 10:54:36 -0400 Received: by wicgb1 with SMTP id gb1so48546908wic.1 for ; Mon, 07 Sep 2015 07:54:35 -0700 (PDT) In-Reply-To: <87vbbni9i1.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Leonard Randall , emacs-orgmode , mail@nicolasgoaziou.fr --f46d04427204871554051f296d5a Content-Type: text/plain; charset=UTF-8 Thanks so much! It works. One issue that I noticed, however, is that the exporter will still give an error for an undefined footnote if a footnote is undefined in a heading that is excluded from export via the exclude tags function. For example if I have tagged a heading 'noexp' in one of my included files, and list noexp on the excluded tags line of the header of my master file the exporter will still complain if there is an undefined footnote under this header. If I export a master file with this code: --- #+EXCLUDE_TAGS: noexp archive notes tasks ARCHIVE #+INCLUDE: "./1WorkingDraft.org" --- It will complain if there is any undefined footnote reference in 1WorkingDraft.org , regardless if it is under a heading marked with one of the excluded tags. It will not complain about this, however, if I explicitly limit the range of the include function to the headings that I wish to export using a custom id. --- #+INCLUDE: "./1WorkingDraft.org::#Chapter1" --- This problem is not a big issue insofar as it is relatively easy to work around, and I probably should not have undefined footnote references hanging around in my org files anyway, but I figure that you should know about the behaviour, as I do not think that it is intended. All best, Leonard On 6 September 2015 at 21:21, Nicolas Goaziou wrote: > Hello, > > Leonard Randall writes: > > > I have my thesis divided into several chapters each with its own org > file. > > I was trying to use org's Include function to compile a pdf of the > complete > > draft using a master file. However, I found that if there was more than > one > > reference to the same footnote in one of my chapter files, the exporter > > would complain that a footnote was undefined. > > > > [...] > > > Suppose this is the master file: > > > > ---- Begin Master.org --- > > * Here is my master file > > It has an include command. > > #+INCLUDE: "./Included.org" > > --- End Master.org --- > > > > If I try to export this file it will throw up an error with either one of > > the following include files. > > --- begin Included.org --- > > #+EXCLUDE_TAGS: noexp archive notes > > #+ARCHIVE: ::* Archived > > * This is a headline. > > > > This is some text. [fn:dd1cd1f9] > > * Archive > :archive: > > ** This is a headline (draft 0) > > Here is a previous version of the text to which I affixed the same > > footnote. [fn:dd1cd1f9] > > * Footnotes > > > > [fn:dd1cd1f9] Here is the footnote > > Fixed. Thank you. > > > --- begin Included.org --- > > * This is a headline. > > This is some text. [fn:dd1cd1f9] > > > > Here is some more text to which I wish to affix the same footnote. > > [fn:dd1cd1f9] > > This is a footnote /definition/ since it starts at column 0. > > > * Footnotes > > > > [fn:dd1cd1f9] Here is a footnote > > This is a second footnote definition for the same label. Syntax is too > much faulty for a clean export. > > > Regards, > > -- > Nicolas Goaziou > --f46d04427204871554051f296d5a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks so much! It works.

One issue that I no= ticed, however, is that the exporter will still give an error for an undefi= ned footnote if a footnote is undefined in a heading that is excluded from = export via the exclude tags function. For example if I have tagged a headin= g 'noexp' in one of my included files, and list noexp on the exclud= ed tags line of the header of my master file the exporter will still compla= in if there is an undefined footnote under this header.
If I expor= t a master file with this code:
---
#+EXCLUDE_= TAGS: noexp archive notes tasks ARCHIVE
#+INCLUDE: "./1WorkingDraft.org"
---
It will complain if there is any undefined footnote = reference in 1WorkingDraft.org , regardless if it is under a heading marked= with one of the excluded tags.

It= will not complain about this, however, if I explicitly limit the range of = the include function to the headings that I wish to export using a custom i= d.
---
#+INCLUDE: "./1WorkingD= raft.org::#Chapter1"
---
This p= roblem is not a big issue insofar as it is relatively easy to work around, = and I probably should not have undefined footnote references hanging around= in my org files anyway, but I figure that you should know about the behavi= our, as I do not think that it is intended.
=C2=A0
All best,
Leonard
<= /div>

On 6 September 2015 at 21:21, Nicolas Goaziou <m= ail@nicolasgoaziou.fr> wrote:
Hello,

Leonard Randall <leonard.= a.randall@gmail.com> writes:

> I have my thesis divided into several chapters each with its own org f= ile.
> I was trying to use org's Include function to compile a pdf of the= complete
> draft using a master file. However, I found that if there was more tha= n one
> reference to the same footnote in one of my chapter files, the exporte= r
> would complain that a footnote was undefined.
>

[...]

> Suppose this is the master file:
>
> ---- Begin Master.org ---
> * Here is my master file
> It has an include command.
> #+INCLUDE: "./Included.org"
> --- End Master.org ---
>
> If I try to export this file it will throw up an error with either one= of
> the following include files.
> --- begin Included.org ---
> #+EXCLUDE_TAGS: noexp archive notes
> #+ARCHIVE: ::* Archived
> * This is a headline.
>
> This is some text. [fn:dd1cd1f9]
> * Archive=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :archive: > ** This is a headline (draft 0)
> Here is a previous version of the text to which I affixed the same
> footnote. [fn:dd1cd1f9]
> * Footnotes
>
> [fn:dd1cd1f9] Here is the footnote

Fixed. Thank you.

> --- begin Included.org ---
> * This is a headline.
> This is some text. [fn:dd1cd1f9]
>
> Here is some more text to which I wish to affix the same footnote.
> [fn:dd1cd1f9]

This is a footnote /definition/ since it starts at column 0.

> * Footnotes
>
> [fn:dd1cd1f9] Here is a footnote

This is a second footnote definition for the same label. Syntax is t= oo
much faulty for a clean export.


Regards,

--
Nicolas Goaziou

--f46d04427204871554051f296d5a--