3

I would like to know if there is an easy way to the following.

I have a statement in later part of an article, say Theorem G with \label{Thm:G}. In the introduction I would like to state this theorem as

Theorem G
2 + 2 = 4.

Is this possible?

I would like to have Theorem 2.1 in the Intro section.

%---- MWE
\documentclass{article}  
\usepackage{amsthm} 
\newtheorem{thm}{Theorem}[section]


\begin{document}  
\section{Intro}

\section{body} 
\begin{thm}\label{theorem G}
$2+2 = 4$.
\end{thm}

\end{document}  
  • To be honest i don't understand the question's purpose, but the answers below show us a point of view completely different. – skpblack Jul 3 '14 at 6:37
  • @skpblack: The answer by Werner is what I was looking for. – Youngsu Jul 3 '14 at 8:58
3

A quick-and-easy way of obtaining this is to create a mock "duplicate" theorem environment which you never really use in its entirety. Instead, you adjust the counter representation to adopt that of a reference to the theorem you're after:

enter image description here

\documentclass{article}
\usepackage{amsthm}
\newtheorem{thm}{Theorem}[section]
\newtheorem{thmB}{Theorem}% Dummy theorem

\begin{document}
\section{Intro}

\renewcommand{\thethmB}{\ref{thm:G}}
\begin{thmB}
$2+2 = 4$.
\end{thmB}

\section{body}
\begin{thm}\label{thm:G}
$2+2 = 4$.
\end{thm}

\end{document}

The advantage here is that you could use multiple different references throughout your document, merely changing \thethmB to your liking.

  • Werner: I have one question. I was not able to understand the renewcommand. What does "\thmthmb" do? – Youngsu Jul 3 '14 at 8:57
  • 1
    @Youngsu: When you create \newtheorem{thmB}{Theorem}, it creates a counter thmB. \thethmB is the printing mechanism for this counter, which defaults to \arabic{thmB} (note that this use of \the is different from what is described in The \the command). So, \thethmB is used or equivalent to <num> when printing Theorem <num>. All I've done is replaced the usual \arabic{thmB} with a reference. – Werner Jul 3 '14 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.