# Using some theorem which I have mentioned before

Say I have written a theorem and named it as Theorem 1.

Now, when I use this theorem I will write that: This follows from Theorem 1.

Now consider this scenario. Say, I added a new theorem before theorem 1. So now, what used to be Theorem 1, has become Theorem 2. Consequently, I have to change this sentence "This follows from Theorem 1." to This follows from Theorem 2."

I want to avoid this problem. How to do this ?

Please keep in mind that I am a beginner.

• – Werner Nov 8 '16 at 18:31

The whole point in latex is, that you don't have to manually write such things. Instead you can give the theorem a \label. See the following short example:

\documentclass{article}
\newtheorem{theorem}{Theorem}[section]

\begin{document}
\section{Introduction}

\begin{theorem}
Let ... \label{test}
\end{theorem}

\ref{test}

\end{document}


This gets even more comfortabel with packages such as \cleveref:

\documentclass{article}
\newtheorem{theorem}{Theorem}[section]

\usepackage{cleveref}
\begin{document}
\section{Introduction}

\begin{theorem}
Let ... \label{test}
\end{theorem}

\ref{test}

\cref{test}

\end{document}