Home › Category Archives › cross-referencing

## Automatically created labels in Structure of TexStudio

I wrote a command for a document with many figures and tables which belong to each other. Every figure/table has the same caption just one parameter changes and the labels are automatically created. The problem is now, that these labels are not in the label list of TexStudio which would be nice.

\documentclass{article}
\usepackage{hyperref}

\DeclareRobustCommand{\captionf}[1]{Parameter of #1\label{fig:Parameter#1} %
\global\def \captiont {Description of \autoref{fig:Parameter#1}}
}

\begin{document}

\begin{figure}[ht]
\centering
lalala
\caption{\captionf{lalala}}
\end{figure}

\begin{table}[ht]
\centering
\begin{tabular}{cc}
la & lu \\
\end{tabular}
\caption{\captiont}
\end{table}

\end{document}


Does somebody knows a solution to this?