# List of referenced items in other document

I'm submitting a scientific paper with supplementary information, i.e. I'm sending two documents : a (short) main document and a second document with text, tables and figures that are referred to in the main document. At the end of the main document, I would like to include a list of items in the second document (sections, figures, tables) with a short description. I thought this would be nice so I can refer to these items as well from the main document.

However, the items take up a lot of space, I'm wondering how to obtain something more concise.

MWE:

\documentclass[english]{article}

\usepackage[figurename=Fig.,labelfont=bf,labelsep=space,justification=justified]{caption}
\usepackage{refstyle}

\newref{stab}{refcmd = {Supporting Information Table~S\ref{#1}}}
\newref{fig}{refcmd = {Fig.~\ref{#1}}}
\newref{sfig}{refcmd = {Supporting Information Fig.~S\ref{#1}}}
\newref{supsubsec}{refcmd = {Supporting Information, \nameref{#1}}}
\DeclareCaptionLabelFormat{support}{#1 S#2}

\begin{document}

\section*{Main text}

Here I'd like to refer to some items in the supplement, such as  \stabref{RNAseq-primary-stats} and \sfigref{coverage-masking}.

\section*{Supporting Information}
\setcounter{figure}{0}

\subsection*{\label{supsubsec:Materials-and-Methods}Materials and Methods S1}

\begin{table}[h]
\captionsetup{labelformat=support}
\caption{\label{stab:RNAseq-primary-stats}RNAseq statistics. }
\end{table}

\begin{table}[h]
\captionsetup{labelformat=support}
\caption{\label{stab:mappop_stats}Read depths for the individuals from the
F1 family.}
\end{table}

\subsection*{\label{supsubsec:Results}Results S1}

\begin{table}
\captionsetup{labelformat=support}
\end{table}

\begin{figure}[h]
\captionsetup{labelformat=support}
\end{figure}

\end{document}


It seems to be mainly the dummy figure that somehow inherits the float preferences and requires its own page. Also, I'd like to have the short titles left aligned, not centered.

The "gold" solution would be to automatically add a list of referenced items in the second document at the end of the first, with a short version of the caption. But I don't know where to start to reach that goal.

• You might be able to use endfloat and separate the resulting PDF into two parts using acrobat or pdfpages. – John Kormylo Jul 22 at 21:44

Found a semi-automatic workaround with xr.

I have two files, the supplement with the additional information I want to refer to (file second.tex) :

\documentclass[english]{article}

\usepackage{refstyle}
\usepackage{nameref}

\usepackage[figurename=Fig.,labelfont=bf,labelsep=space,justification=justified]{caption}
\DeclareCaptionLabelFormat{support}{#1 S#2}

\begin{document}

\subsection*{\label{supsubsec:Materials-and-Methods}Materials and Methods S1}

\begin{table}[h]
\captionsetup{labelformat=support}
\caption{\label{stab:RNAseq-primary-stats} RNAseq statistics. }
\end{table}

\begin{table}[h]
\captionsetup{labelformat=support}
\caption{\label{stab:mappop_stats} Read depths for the individuals from the
F1 family.}
\end{table}

\subsection*{\label{supsubsec:Results} Results S1}

\begin{table}
\captionsetup{labelformat=support}
\end{table}

\begin{figure}[h]
\captionsetup{labelformat=support}
\end{figure}

\end{document}


In the main document, I use \externaldocument{second} from the xr package, and manually make a list of all the items I want to list :

\documentclass[english]{article}

\usepackage[figurename=Fig.,labelfont=bf,labelsep=space,justification=justified]{caption}
\usepackage{refstyle}
\usepackage{nameref}

\usepackage{xr}
\externaldocument{second}

\newref{stab}{refcmd = {Supporting Information Table~S\ref{#1}}}
\newref{sfig}{refcmd = {Supporting Information Fig.~S\ref{#1}}}
\newref{supsubsec}{refcmd = {Supporting Information, \nameref{#1}}}

\begin{document}

\section*{Main text}

Here I'd like to refer to some items in the supplement, such as \stabref{RNAseq-primary-stats} and \sfigref{coverage-masking}.

\section*{Supporting Information}

\newref{stab}{refcmd = {Table~S\ref{#1}}}
\newref{sfig}{refcmd = {Fig.~S\ref{#1}}}

\stabref{RNAseq-primary-stats}: RNAseq statistics.

\stabref{mappop_stats}: Read depths for the individuals from the
F1 family.