Auctex 14.1.2. When making both slides and notes using beamer, I use the
following workflow:
- main.tex contains actual content, but no documentclass
- main-slides.tex: \documentclass{beamer}, inputs main.tex
- main-notes.tex: \documentclass{article}, inputs main.tex, includes actual
slides as images with \includeslide.
TeX-master for main.tex is set to main-slides.[1]
I added a command called "both" to TeX-command-list that runs latex twice,
first on slides, and then on notes:
(add-to-list 'TeX-command-list
(list "both" "%`%l%(mode)%' %s; %`%l%(mode)%' %N" 'TeX-run-TeX nil nil))
with %N being defined as
(add-to-list 'TeX-expand-list '("%N" TeX-filename-slides-to-notes))
This worked fine with xelatex, but stopped after I switched to lualatex. The
following entry for luatex in TeX-engine-alist-builtin (tex.el:1583 for me)
(luatex "LuaTeX" "luatex" "lualatex --jobname=%(s-filename-only)" "luatex")
specifically the "--jobname" argument seems to be the culprit. Because the
master does not change, %(s-filename-only) expands to main-slides, and it looks
like slides.pdf gets wiped out before notes.pdf is generated, so attempts to
include slides as images into notes.pdf fails.
For now, I've added the luatex entry without --jobname to TeX-engine-alist, but
I'm wondering why only the luatex entry has --jobname, and whether removing
--jobname from the entry might break something else.
Sorry for the looong email, and thanks for any advice!
-mandar
---------------------------------------------------------------------------
[1] AFAIR, I asked on this list about the possibility of having multiple
masters, but there's probably no general interpretation of what it means to
have multiple masters.