Hi Tassilo, On 14/10/15 18:36, Tassilo Horn wrote: > David O'Shaughnessy <[email protected]> writes: > > Hi David, > >>>> Is there a way to make RefTeX understand that the master file is an >>>> .Rnw file? >>> >>> I've just tried doing that by putting the following local variables >>> section into the included tex files: >>> >>> %%% Local Variables: >>> %%% mode: latex >>> %%% TeX-master: "test.Rnw" >>> %%% TeX-default-extension: "Rnw" >>> %%% End: >>> >>> That seems to work although I only tested very briefly. >> >> For some reason that doesn't work for me. reftex-toc is only aware of >> the entire multi-document structure if I use; >> >> %%% Local Variables: >> %%% mode: latex >> %%% TeX-master: "master.tex" >> %%% TeX-default-extension: "tex" >> %%% End: >> >> whereas; >> %%% Local Variables: >> %%% mode: latex >> %%% TeX-master: "master.Rnw" >> %%% TeX-default-extension: "Rnw" >> %%% End: >> >> leaves reftex-toc only showing the structure for whatever child document >> is in the buffer. Maybe my Emacs is too old (24.3.1)? > > Maybe, but I only tested very briefly. I have never used knitr and just > made up some test files. Do you have some minimal sample files I could > use for testing?
Attached is an archive with a working example. The structure is: master.Rnw -> ./chapter1.tex -> ./chapter2.Rnw -> ./chapter3.tex refs.bib I've run it through knitr and compiled it with xelatex (see master.pdf), so you can just open master.Rnw with emacs and test out reftex-toc and reftex-citation. Hopefully this is useful, Dave.
rnw_example.tar.gz
Description: GNU Zip compressed data
_______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
