auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] reftex-select-toggle-follow for master and slave file


From: Arash Esbati
Subject: Re: [AUCTeX-devel] reftex-select-toggle-follow for master and slave files
Date: Thu, 24 Nov 2016 12:16:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1

Uwe Brauer <address@hidden> writes:

>     > I didn't make any tests with your files, but are you aware of this part
>     > of RefTeX doc?
>
>     >     3.2 Referencing Labels[1]
>
>     >     f
>
>     >         Toggle follow mode.  When follow mode is active, the other
>     >         window will always display the full context of the current
>     >         label.  This is similar to pressing SPC after each cursor
>     >         motion.  Note that only context in files already visited is
>     >         shown.  RefTeX will not visit a file just for follow mode.  See,
>     >         however, the variable reftex-revisit-to-follow.
>
>     > Does this apply to your observation?
>
> Indeed this is the variable I was looking for, setting it to t, shows
> precisely the behavior I was looking for. Thanks again very much Arash
> for this helpful information, and I thought I scanned the documentation.

You're welcome.  I have a question, though.  Let's say you have 3 files
like these:

--8<---------------cut here---------------start------------->8---
\documentclass[12pt]{article} % This is main.tex
\usepackage{subfiles}
\begin{document}
\subfile{section1.tex}
\subfile{section2.tex}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

\documentclass[main]{subfiles} % This is section1.tex
\begin{document}
\begin{equation}
  \label{eq:section1:1}
  \int f dx =0
\end{equation}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:

\documentclass[main]{subfiles} % This is section2.tex
\begin{document}
\begin{equation}
  \label{eq:section2:1}
  \sum \alpha_k=0
\end{equation}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
--8<---------------cut here---------------end--------------->8---

If you restart Emacs and open main.tex *only*, you have access to all
labels defined in the subfiles?  I don't get anything when I open
main.tex and hit `C-c )' (RefTeX enabled).

The reason I'm asking is that I have implemented such a feature for
`ltxtable.el' where you have labels in other tex files and include them
with \LTXtable{<width>}{filename.tex} and had to go through more hassle.
Maybe you can help me here.

Best, Arash



reply via email to

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