auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] RefTeX + knitr: Multi-document with master *.Rnw file


From: David O'Shaughnessy
Subject: [AUCTeX] RefTeX + knitr: Multi-document with master *.Rnw file
Date: Mon, 12 Oct 2015 19:23:06 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Hello,

I have a multi-document structure that is a mixture of .tex and .Rnw
files. The main file (master.Rnw) calls the child .tex files with;
\include{file.tex}

and the child .Rnw files (which are knitted) with;
<<chunk, child='file.Rnw'>>=
@

I include my biblatex references in master.Rnw with;
\addbibresource{references.bib}

I compile it all with a Makefile, and it works very smoothly. However, I
am having trouble getting RefTeX to play nice with this setup. There are
two problems:

1) In Emacs, reftex-citation does not recognize my bibliography when
inside child documents. I can fix this by setting TeX-master to
"master.tex", but not "master.Rnw", which leads to problem 2

2) While setting the master document as "master.tex" enables inserting
citations via reftex-citation in child documents, it breaks reftex-toc
by sending me into "master.tex" instead of "master.Rnw" (if I select a
ToC entry from the master file). Then I run the risk of making edits in
master.tex only to have them overwritten by master.Rnw when I do a
compile (which knits the contents of master.Rnw to master.tex).

Is there a way to make RefTeX understand that the master file is an .Rnw
file?

Thanks,

Dave.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]