auctex-devel
[Top][All Lists]
Advanced

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

Re: reftex-view-crossref seems not to work for external documents


From: Arash Esbati
Subject: Re: reftex-view-crossref seems not to work for external documents
Date: Tue, 09 Aug 2022 10:12:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Uwe,

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

>>>> "AE" == Arash Esbati <arash@gnu.org> writes:
>
>> Can you try this in your main.tex and see if it works:
>
>> \documentclass[12pt]{article}
>> \usepackage[T1]{fontenc}
>> \usepackage[utf8]{inputenc}
>
>> \usepackage{varioref}
>> \usepackage{xr-hyper}
>> \usepackage[colorlinks]{hyperref}
>> \usepackage{cleveref}
>> \newtheorem{thm}{Theorem}
>> \newtheorem{defn}{Definition}
>> \newtheorem{lem}{Lemma}
>> \newtheorem{cor}{Corollary}
>> \newtheorem{prop}{Propostion}
>
>> \usepackage{equation}
>> \externaldocument[A-]{file1} % <==
>
>
>> \begin{document}
>
>> This is a test which doesn't work.
>> (\ref{E:EULERPOISSON})
>
>> These work.
>> \ref{A-E:EULERPOISSON}
>> (\ref{A-E:EULERPOISSON})
>
>> \end{document}
>
> Thanks Arash, no it does not work for me, two observations
>
>     1. Should I then also change the label in the file1 document? I
> tried changing and not changing but it did not help.

No, you don't need to touch your file1.tex, just change your main.tex
where you reference the external labels.  Maybe letting RefTeX reparse
your main.tex helps?

>     2. It is strange that reftex-reference finds the label without
> speciftying the parameter you mention and inserts the reference
> without the parameter, so reftex-reference is *intelligent* while
> reftex-view-crossref is *not* 🙃

Yes, it seems so.  But with the optional argument in \externaldocument,
`reftex-reference' will prefix all external labels with A-, so the
workflow should be easy.

Best, Arash



reply via email to

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