all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: org-export-async-init-file
Date: Sun, 29 Sep 2013 20:51:41 +0200	[thread overview]
Message-ID: <87k3hzv4ua.fsf@gmx.us> (raw)
In-Reply-To: m1mwmvh5fr.fsf@tsdye.com

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—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



-- 
You people at the NSA are becoming my new best friends!

  reply	other threads:[~2013-09-29 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-29 18:02 org-export-async-init-file Thomas S. Dye
2013-09-29 18:51 ` Rasmus [this message]
2013-09-29 22:02   ` org-export-async-init-file Thomas S. Dye
2013-09-30  9:24   ` org-export-async-init-file Sebastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3hzv4ua.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.