Is it possible to do the following with AucTeX:
Suppose you have a master file (master.tex) like:
\documentclass{minimal}
\begin{document}
\input{fileA}
\input{fileB}
\end{document}
and for example fileA.tex looks like:
Some text
%% Local Variables:
%% coding: utf-8
%% TeX-master: "master.tex"
%% End:
Now I am looking for an easy way to navigate between the master and input files, so I need the following:
Click (with modifier) on
\input{fileA}in the master file to openfileA.texor just switch to its buffer if it exists. Alternatively to clicking: move point tofileAan press some key sequence to do the same.When you are
fileA.tex: Press a key sequence to open the master file or just switch to its buffer if it exists and move the point to the line\input{fileA}.
Same with \include instead of \input.
So, how can I do this or something similar in AucTeX?
find-file-at-pointfor question 1. Question 2 would require some elisp hacks withTeX-masterandsearch-forward, and you would have to be very careful for example if you inadvertently input the same file twice (even in a comment). As an out-of-the-box solution, you can checkreftex, and in particular its table of contents feature (C-c =). In that table of contents, pressingFwill show the file boundaries, allowing you to perform the kind of navigation you request. – T. Verron Jun 04 '14 at 17:07(find-file (TeX-master-file t nil t)). – giordano Jun 04 '14 at 20:54