From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Multi-file and master files Date: Wed, 01 Oct 2014 11:03:22 +0200 Message-ID: <871tqsjh5x.fsf@gmx.us> References: <87d2acf9w1.fsf@newcastle.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZFp0-0005Wc-Sl for emacs-orgmode@gnu.org; Wed, 01 Oct 2014 05:03:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZFov-0001nC-6g for emacs-orgmode@gnu.org; Wed, 01 Oct 2014 05:03:42 -0400 Received: from mout.gmx.net ([212.227.17.20]:54528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZFou-0001n7-Ry for emacs-orgmode@gnu.org; Wed, 01 Oct 2014 05:03:37 -0400 In-Reply-To: <87d2acf9w1.fsf@newcastle.ac.uk> (Phillip Lord's message of "Wed, 01 Oct 2014 09:54:06 +0100") 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: phillip.lord@newcastle.ac.uk Cc: emacs-orgmode@gnu.org Hi Phillip, phillip.lord@newcastle.ac.uk (Phillip Lord) writes: > I've been writing a long document in org-mode recently. I decided to use > org-mode for two reasons: firstly, I wrote the outline plan in org > anyway and switching tools was irritating; second, I want both PDF and > HTML output. My tool of choice would have been latex and auctex where it > not for the HTML requirement. > > Setting it up was a little difficult, but in general it's going okay > now. However, I am really missing the notion of "master" documents from > auctex. I have a "main" file which just includes other files each of > which contain a specific section. > > Now, the export functionality works, but many org commands appear not > to work propertly. So, for example, footnotes adds new footnotes > starting from 1 in each file, but in the HTML export the earlier > footnotes get overwritten. Likewise, there is no good tool for putting > in crosslinks, compared to reftex in latex. > > Am I missing things here? Or would it make more sense to move to latex, > with all the hacking that this entails for the HTML output. I might be misunderstanding your question here, so bear(?) with me. I think #+INCLUDE: "$FILE" should take care of what you want. Basically, at export time, INCLUDE is expanded to the content of $FILE in the buffer. Footnotes should work. Your structure should be something like: > cat master.org #+TITLE: my title * intro Txt with footnotes #+INCLUDE: "chapter1.org" > cat chapter1.org * chapter 1 Txt with footnotes To include something put "