%% -*- coding: utf-8 -*-
%% Timestamp: "2025-09-30 18:04:19 (ywatanabe)"
%% File: "/ssh:sp:/home/ywatanabe/proj/neurovista/paper/00_shared/latex_styles/linker.tex"

%% --- Linker for supplemtal material ---
\usepackage{xr}
\makeatletter
\newcommand*{\addFileDependency}[1]{% argument=file name and extension
  \typeout{(#1)}
  \@addtofilelist{#1}
  \IfFileExists{#1}{}{\typeout{No file #1.}}
}
\makeatother

\newcommand*{\link}[2][]{%
    \externaldocument[#1]{#2}%
    \addFileDependency{#2.tex}%
    \addFileDependency{#2.aux}%
}

%%%% EOF