From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Collapse LaTeX source before start of main document? Date: Thu, 5 May 2011 07:46:08 -0700 Message-ID: <20110505074608.48b834e4@bhishma.homelinux.net> References: <20110504152539.7f66f9af@kuru.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHzop-0001X1-3w for emacs-orgmode@gnu.org; Thu, 05 May 2011 10:46:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHzoo-0005xP-8a for emacs-orgmode@gnu.org; Thu, 05 May 2011 10:46:19 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:61348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHzoo-0005xI-1H for emacs-orgmode@gnu.org; Thu, 05 May 2011 10:46:18 -0400 Received: by pzk4 with SMTP id 4so1424786pzk.0 for ; Thu, 05 May 2011 07:46:16 -0700 (PDT) In-Reply-To: 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: Chris Malone Cc: emacs-orgmode@gnu.org Hi Chris, On Thu, 5 May 2011 10:23:50 -0400 Chris Malone wrote: > @Suvayu: Thanks for the suggestion. That is essentially what I am > doing now with the #+LaTeX_HEADER lines, but the problem is that I > have a bunch of things which must follow the \begin{document} in > LaTeX. I know I could put this in a separate file and just \input{} > it; I wanted to see if there was a way to keep everything together in > a single file, but also have the ability to fold this preliminary > stuff. > In the last few months I realised it is rather difficult with export of org files if you deviate from the "everything is an outline paradigm". The only effective way around the problem seems to be including from separate files, either org or tex files (for latex export). For example for my appendix and bibliography I use the following: #+INCLUDE: thesis-appendix.org :minlevel 1 \backmatter \newpage \addcontentsline{toc}{chapter}{\bibname} \bibliographystyle{plain} \bibliography{master} where thesis-appendix.org looks something like: \appendix \appendixpage \addappheadtotoc * First appendix * Second appendix I wish there was a cleaner solution too. :-/ > Chris -- Suvayu Open source is the future. It sets us free.