I have looked at all the previously posted answers. None have answered my questions. This is my example:
I have a main document called paper.tex:
\documentclass[11pt,twoside,a4paper]{article}
\usepackage{hyperref}
\usepackage{xr-hyper}
\begin{document}
\title{Title}
\begin{abstract}
Abstract
\end{abstract}
\maketitle
\section{Test}
\label{sec:test}
\input{sec/test}
\end{document}
In test.tex, I have two other documents:
\subsection{Test One} \label{sec:test1}
\input{sec/test1}
\subsection{Test Two} \label{sec:test2}
\input{sec/test2}
The test.tex contains a figure:
\begin{figure*}[tp!]
\label{fig:fig1}
\centering
\caption{My Figure}
\end{figure*}
I want to reference the figure from test2.tex:
\externaldocument{test1}
As show in \autoref{fig:fig1}.
Unfortunately, the output is not referencincing the figure as Figure 1, but as: subsection 1.1
Can you please correct my example?