Text FormattingRefer to Theorem that contains several Parts

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
User avatar
Mohsen Avaji
Posts: 16
Joined: Mon Aug 27, 2012 12:06 am

Refer to Theorem that contains several Parts

Post by Mohsen Avaji »

Hi,

in books and papers often a theorem contains several parts, labeled (i), (ii), ...

Code: Select all

\begin{theorem}
  Let $A$ be a finite set and $f$ a map from $A$ to itself. The following statements are equivalent:
  \begin{itemize}
    \item[(i)] $f$ is injective.
    \item[(ii)] $f$ is surjective.
    \item[(iii)] $f$ is a bijection.
  \end{itemize}
\end{theorem}
I want refer to part(i) of this theorem but I do not know how to do it. How can I do that? I'd be very grateful for any help.
Last edited by localghost on Mon Jun 24, 2013 9:53 am, edited 1 time in total.
Yours faithfully,
Mohsen Avaji.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Refer to Theorem that contains several Parts

Post by localghost »

Please get used to always preparing a self-contained and minimal example. People are rarely motivated to write one on their own just to test solutions for you.

In your case you are better with using an {enumerate} environment instead of {itemize}. It can be customized easily by enumitem. The single list items can be referenced by the common mechanism of the \label and \ref commands.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{enumitem}

\newtheorem{theorem}{Theorem}

\begin{document}
  \begin{theorem}
    Let $A$ be a finite set and $f$ a map from $A$ to itself. The following statements are equivalent:
    \begin{enumerate}[label={(\roman*)},itemindent=1em]
      \item $f$ is injective. \label{thm:injective}
      \item $f$ is surjective. \label{thm:surjective}
      \item $f$ is a bijection. \label{thm:bijection}
    \end{enumerate}
  \end{theorem}

  Reference to item \ref{thm:surjective}.
\end{document}
For a deeper understanding of the involved packages take a look at their manuals.


Thorsten
User avatar
Mohsen Avaji
Posts: 16
Joined: Mon Aug 27, 2012 12:06 am

Refer to Theorem that contains several Parts

Post by Mohsen Avaji »

localghost wrote: In your case you are better with using an {enumerate} environment instead of {itemize}. It can be customized easily by enumitem. The single list items can be referenced by the common mechanism of the \label and \ref commands.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{enumitem}

\newtheorem{theorem}{Theorem}

\begin{document}
  \begin{theorem}
    Let $A$ be a finite set and $f$ a map from $A$ to itself. The following statements are equivalent:
    \begin{enumerate}[label={(\roman*)},itemindent=1em]
      \item $f$ is injective. \label{thm:injective}
      \item $f$ is surjective. \label{thm:surjective}
      \item $f$ is a bijection. \label{thm:bijection}
    \end{enumerate}
  \end{theorem}
  
  Reference to item \ref{thm:surjective}.
\end{document}
For a deeper understanding of the involved packages take a look at their manuals.
Thorsten
Hi
Thank you for your help.
In the following I have used ‎\usepackage{theoremref},‎‎ this package refer to theorem with number (in the following example \thref refer to theorem "Theorem 1")
but I want refer to part(i) of theorem by the common mechanism of the \label and \ref and after run have ("Theorem 1(i)").
Any suggestion is appreciated.

Best,
Mohsen

Code: Select all

    \documentclass[11pt]{article}
    \usepackage[T1]{fontenc}
    \usepackage{enumitem}
    \usepackage{theoremref}
    \newtheorem{theorem}{Theorem}

    \begin{document}
      \begin{theorem}\thlabel{theorem}
        Let $A$ be a finite set and $f$ a map from $A$ to itself. The following statements are equivalent:
        \begin{enumerate}[label={(\roman*)},itemindent=1em]
          \item $f$ is injective. \label{thm:injective}
          \item $f$ is surjective. \label{thm:surjective}
          \item $f$ is a bijection. \label{thm:bijection}
        \end{enumerate}
      \end{theorem}
     Reference to theorem \thref{theorem}.
    \end{document}
Yours faithfully,
Mohsen Avaji.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Refer to Theorem that contains several Parts

Post by localghost »

Mohsen Avaji wrote:[…] but I want refer to part(i) of theorem by the common mechanism of the \label and \ref and after run have ("Theorem 1(i)"). […]
Any reason against writing it this way?

Code: Select all

Reference to \thref{thm:theorem}\ref{thm:surjective}.
Post Reply