From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: org-export-async-init-file Date: Sun, 29 Sep 2013 12:02:49 -1000 Message-ID: References: <87k3hzv4ua.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQP5E-0002mA-0R for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 18:03:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQP57-0005DY-Qr for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 18:03:19 -0400 Received: from oproxy12-pub.mail.unifiedlayer.com ([50.87.16.10]:47413) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VQP57-0005DS-Ja for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 18:03:13 -0400 In-Reply-To: <87k3hzv4ua.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 29 Sep 2013 20:51:41 +0200") 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: Rasmus Cc: emacs-orgmode@gnu.org Of course!=20 Thanks for your help, Tom Rasmus writes: > tsd@tsdye.com (Thomas S. Dye) writes: > > > >> My question: how to change the value of org-export-async-init-file when I >> export the subtree? > > Perhaps babel and org-element? I'm not sure of the order of > execution, but perhaps you can can check the title and set the init > file condtional on that. > > In any case based on your example=E2=80=94which may be a simplified refle= ction > of reality or which I may have misunderstood=E2=80=94it is not necessary = to > change the init file to load different packages. > > > Example 1: > > * main doc > lorem ipsum > * supplementary material :noex= port: > :PROPERTIES: > :EXPORT_LATEX_HEADER: \usepackage{test} > :END: > more txt > > Alternatively, since you're using different LATEX_CLASSes you could > load different packages here. > > >> In the spirit of an ECM, I offer the following EIM to illustrate what >> I'm trying to do. >> >> #+TITLE: Paper >> #+LATEX_CLASS: journal-article >> >> * Paper Section 1 >> * Paper Section 2 >> * Supplementary Material >> >> Describe supplementary material ... >> >> ** Supplementary Material Document :noex= port: >> :PROPERTIES: >> :EXPORT_FILE_NAME: supplementary-material >> :EXPORT_TITLE: Supplementary Material for Paper >> :EXPORT_LATEX_CLASS: journal-article-supplement >> :END: >> >> * Editing setup :noex= port: >> #+name: editing-setup >> #+begin_src emacs-lisp >> (require 'ox-latex) >> (setq org-export-in-background t) >> (setq org-export-async-debug t) >> (setq org-export-async-init-file (expand-file-name "init-journal-artic= le.el")) >> ... >> #+end_src >> >> * Initialization File for Journal Article :noex= port: >> >> #+name: export-setup-journal-article >> #+header: :tangle init-journal-article.el >> #+begin_src emacs-lisp >> (setq org-latex-packages-alist nil) >> (add-to-list 'org-latex-packages-alist '("" "setspace")) >> ... >> #+end_src >> >> * Initialization File for Journal Article Supplementary Material :noex= port: >> >> #+name: export-setup-journal-article-supplement >> #+header: :tangle init-journal-article-supplement.el >> #+begin_src emacs-lisp >> (setq org-latex-packages-alist nil) >> (add-to-list 'org-latex-packages-alist '("" "setspace")) >> (add-to-list 'org-latex-packages-alist '("" "attachfile")) >> ... >> #+end_src --=20 Thomas S. Dye http://www.tsdye.com