* org-export-async-init-file
@ 2013-09-29 18:02 Thomas S. Dye
2013-09-29 18:51 ` org-export-async-init-file Rasmus
0 siblings, 1 reply; 4+ messages in thread
From: Thomas S. Dye @ 2013-09-29 18:02 UTC (permalink / raw)
To: Org-mode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-export-async-init-file
2013-09-29 18:02 org-export-async-init-file Thomas S. Dye
@ 2013-09-29 18:51 ` 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
0 siblings, 2 replies; 4+ messages in thread
From: Rasmus @ 2013-09-29 18:51 UTC (permalink / raw)
To: emacs-orgmode
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!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-export-async-init-file
2013-09-29 18:51 ` org-export-async-init-file Rasmus
@ 2013-09-29 22:02 ` Thomas S. Dye
2013-09-30 9:24 ` org-export-async-init-file Sebastien Vauban
1 sibling, 0 replies; 4+ messages in thread
From: Thomas S. Dye @ 2013-09-29 22:02 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Of course!
Thanks for your help,
Tom
Rasmus <rasmus@gmx.us> 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—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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-export-async-init-file
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 ` Sebastien Vauban
1 sibling, 0 replies; 4+ messages in thread
From: Sebastien Vauban @ 2013-09-30 9:24 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello Rasmus and Thomas,
Rasmus wrote:
>> 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.
A detail: maybe checking on some tags (instead of the title), to make the
solution applicable in many more documents?
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-30 9:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29 18:02 org-export-async-init-file Thomas S. Dye
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
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).