[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Better way to specify the latex documentclass of an exported fil
From: |
Richard Lawrence |
Subject: |
Re: [O] Better way to specify the latex documentclass of an exported file without changing my configuration? |
Date: |
Wed, 26 Mar 2014 16:26:16 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Hi Alan,
Alan Schmitt <address@hidden> writes:
> Feng Shu <address@hidden> writes:
>
>> Alan Schmitt <address@hidden> writes:
>>
>>> Hello,
>>>
>>> I'm collaborating on a paper with some colleagues, and I convinced them
>>> to use org-mode. I'm trying to make sure the paper is as self-contained
>>> as possible (I don't want them to have to change their emacs
>>> configuration file).To change the documentclass name of the exported
>>
>> Maybe you can write a Makefile to change their emacs configure...
>
> I don't want to push my luck ;-)
I wouldn't have a Makefile change their .emacs, but this does seem like
a good application for a Makefile or similar.
You can put code that configures Emacs/Org in the way you need for
compiling your document in a separate file in the repository, then load
that file using Emacs' --load flag in the command that runs the
export/compilation.
For example, here's a snippet of the Makefile I use for my
dissertation. This compiles the bibliography from my Org-based reading
list:
#+BEGIN_EXAMPLE
BATCH_EMACS=$(EMACS) --batch -Q
bib: tasks.org lib/el/bib-export.el
$(BATCH_EMACS) --load lib/el/bib-export.el --file tasks.org --funcall
reading-list-to-bibtex
#+END_EXAMPLE
(The code that lives in bib-export.el takes care of walking over the
reading entries in tasks.org and exporting them to Bibtex. It is where
reading-list-to-bibtex is defined. I'm happy to share if you want to
see it.)
This allows me to just type `make bib' to get a fresh copy of my .bib file.
Another nice thing about this approach is that you can use the -Q flag,
as I've done here, to make sure that Emacs' configuration is clean
before the export begins, which should make compilation more reliable.
--
Best,
Richard
Re: [O] Better way to specify the latex documentclass of an exported file without changing my configuration?, Nicolas Goaziou, 2014/03/26