auctex-devel
[Top][All Lists]
Advanced

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

Re: support xr-hyper (xr) in auctex and reftex


From: Arash Esbati
Subject: Re: support xr-hyper (xr) in auctex and reftex
Date: Mon, 04 Oct 2021 11:33:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Uwe Brauer <oub@mat.ucm.es> writes:

>> RefTeX supports xr package[1].  As long as you don't give the nocite
>> option, it should work fine.  I didn't test it with your files, but in
>> RefTeX's label selection menu, hit 'x'.  This is the description[2]:
>
>>  x
>>     Reference a label from an external document.  With the LaTeX package
>>     xr it is possible to reference labels defined in another document.
>>     This key will switch to the label menu of an external document and
>>     let you select a label from there (see section xr).
>
> Well I tried that, but it did not work, typing x does not jump offer
> anything from the master file.

I tried it now with these 2 files:

,----[ This is uwe-xr.tex ]
| \documentclass[12pt]{article}
| \usepackage{xr-hyper}
| \externaldocument{uwe-master}
| \usepackage[colorlinks]{hyperref}
| 
| \begin{document}
| 
| This is true \ref{eq:master1}
| 
| (symbol-value reftex-docstruct-symbol)
| 
| \end{document}
| 
| %%% Local Variables:
| %%% mode: latex
| %%% TeX-master: t
| %%% End:
`----

,----[ This is uwe-master.tex ]
| \documentclass[12pt]{article}
| \usepackage{amsmath,amsthm}
| \usepackage[colorlinks]{hyperref}
| 
| \begin{document}
| this is an equation 
| \begin{equation}
|   \label{eq:master1}
|   \int f dx
| \end{equation}
| \end{document}
| 
| %%% Local Variables:
| %%% mode: latex
| %%% TeX-master: t
| %%% End:
`----

And it works.  In uwe-xr.tex, I hit `C-c ) RET SPACE x' and I get this
in *RefTeX Select*:

>               eq:master1
.                 \int f dx 

Eval'ing the symbol-value form contains an entry for `xr-doc'.

Are the files in the same directory?

> When I run  reftex-reference and then ?
>
> I see a long list of possibilities, how can I move the cursor down
> because I don't see the whole list!

Good question, I have to check.

Best, Arash



reply via email to

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