# how to edit in one place and auto refer to other place

this question's title may not clearly. my english expression is not good. take an example to convey my problem:

   \someorder{a}{\paragraph{1999}ABCD}
\someorder{a}


I expect after compile this code , it will show two same paragraph, the second one will auto refers to the fist one

• Maybe you are interested in using \label and \ref? – leandriis Aug 8 at 14:28
• Could you please also explain what  \someorder is supposed to do / how it is defined? – leandriis Aug 8 at 14:29
• Maybe this is what you are looking for: stackoverflow.com/questions/1211888/… – Hiwi Makro Aug 8 at 14:44
• @ Hiwi Makro thank you,\defand\newcommand is useful – nevermind_15 Aug 8 at 14:54

Based on @leandriis comment, this might be what you are looking for is Lable/Reference.

For example:

\documentclass[tikz]{standalone}

\begin{document}

This is some dummy Text, don't mind me.

$$\label{eq:1} 1+1 = 2$$

\begin{figure}
\centering
\includegraphics[width=0.3\textwidth]{1.png}
\caption{Some Picture}
\label{fig:1}
\end{figure}

This also works for some reference for pictures \ref{fig:1}.

\end{document}


which produces:

This works for a lot more than just equations and figures, but I hope you get the idea.