emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Org-mode <emacs-orgmode@gnu.org>
Subject: org-export-async-init-file
Date: Sun, 29 Sep 2013 08:02:32 -1000	[thread overview]
Message-ID: <m1mwmvh5fr.fsf@tsdye.com> (raw)

Aloha all,

I've been following up on John Kitchin's recipe for creating a pdf file
compendium that can be used as the supplementary material for a journal
article.  The journal I'm targeting provides a list of LaTeX packages
that must be used exactly, without omissions or additions.

John's recipe uses the LaTeX package attachfile, which is not on the
list of packages that can be used in preparing the journal article.  It
is OK to use attachfile to prepare the pdf file distributed as supplementary
material. 

I'm trying to set up the Org-mode file to use asynchronous export, both
for the paper and for the supplementary material.  I want to use one
init file when I export the paper, and a different init file when I
export the subtree that contains the supplementary material.

My question: how to change the value of org-export-async-init-file when I
export the subtree?

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

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-29 18:02 Thomas S. Dye [this message]
2013-09-29 18:51 ` org-export-async-init-file Rasmus
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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=m1mwmvh5fr.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).