> > I don't know the answer to your question, but when I came across the
> > same problem, I used a makefile-like solution because I felt that the
> > building process was becoming sufficiently complicated to warrant using
> > a specialised tool. If you are comfortable with CMake already it may be
> > worth a look. Have a look for "UseLatex.cmake".
> >
> > Basically you get emacs to export the .tex file from the .org file:
> >
> > add_custom_command(
> > OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mypaper.tex
> > COMMAND emacs --batch
> > --visit=${CMAKE_CURRENT_BINARY_DIR}/
mypaper.org
> > --load=/home/me/myfuncs.el
> > --funcall org-export-as-latex-batch
> > DEPENDS orgfile
> > COMMENT "Exporting orgmode file to LaTeX using emacs"
> > )
> >
> > And then bibtex and nomenclature are asked to do their stuff, and a pdf
> > is produced, with something like this directive:
> >
> > add_latex_document( mypaper.tex
> > INPUTS tex/bibliography.tex
> > texlib/mystyle.sty
> > BIBFILES texlib/mylibrary.bib
> > DEFAULT_PDF
> > USE_NOMENCL
> > )
> >
> > I also get it to generate all my R plots. Other advantages are that you
> > get an out-of-source build that is isolated (to some extent) in its own
> > directory. And I think it is easier to diagnose the problems when
> > things go wrong, better than staring at an elisp backtrace. Now if org
> > would write my CMakeList.txt for me, that would be a fine thing.
> >
> > Myles
>