[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-export-async-init-file
From: |
Thomas S. Dye |
Subject: |
Re: [O] org-export-async-init-file |
Date: |
Sun, 29 Sep 2013 12:02:49 -1000 |
Of course!
Thanks for your help,
Tom
Rasmus <address@hidden> writes:
> address@hidden (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—which may be a simplified reflection
> of reality or which I may have misunderstood—it is not necessary to
> change the init file to load different packages.
>
>
> Example 1:
>
> * main doc
> lorem ipsum
> * supplementary material :noexport:
> :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 :noexport:
>> :PROPERTIES:
>> :EXPORT_FILE_NAME: supplementary-material
>> :EXPORT_TITLE: Supplementary Material for Paper
>> :EXPORT_LATEX_CLASS: journal-article-supplement
>> :END:
>>
>> * Editing setup :noexport:
>> #+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-article.el"))
>> ...
>> #+end_src
>>
>> * Initialization File for Journal Article :noexport:
>>
>> #+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 :noexport:
>>
>> #+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
--
Thomas S. Dye
http://www.tsdye.com