4

I want to create two hierarchy levels of theorems. The goal is to have something like this:

Research Question 1: bla bla
Research Question 2: bla bla

And then in another section of the article, I would like to do something like this:

Research Question 1.1 bla bla
Research Question 1.2 bla bla

Research Question 2.1 bla bla
Research Question 2.2 bla bla

I used the following code:

\newtheorem{researchquestion}{Research Question}

\makeatletter
\newenvironment{subresearchquestion}[1]{%
  \def\subtheoremcounter{#1}%
  \refstepcounter{#1}%
  \protected@edef\theparentnumber{\csname the#1\endcsname}%
  \setcounter{parentnumber}{\value{#1}}%
  \setcounter{#1}{0}%
  \expandafter\def\csname the#1\endcsname{\theparentnumber.\Alph{#1}}%
  \ignorespaces
}{%
  \setcounter{\subtheoremcounter}{\value{parentnumber}}%
  \ignorespacesafterend
}
\makeatother
\newcounter{parentnumber}

However, the result is not exactly how it should look like: Research Question 1: bla bla Research Question 2: bla bla

And then in another section of the article, I would like to do something like this:

Research Question 3.1 bla bla
Research Question 3.2 bla bla

Research Question 4.1 bla bla
Research Question 4.2 bla bla

How can I achieve that the subtheorems are really subtheorems? I tried this approach: How to number subtheorems hierarchically? but the problem then is that the theorem numbering is influenced by the section numbering. I want this two things have independently.

  • 1
    It's not really clear: the questions you number 1.1 and 1.2 should refer to the question numbered 1, while 3.1 has nothing to do with a question 3? – egreg Feb 13 '14 at 15:27
4

See also Remove chapter number from theorem number

\documentclass{article}   

\newtheorem{theorem}{Theorem}[section]
\newtheorem{subtheorem}{Sub-Theorem}[theorem]

\renewcommand{\thetheorem}{\arabic{theorem}}
\renewcommand{\thesubtheorem}{\arabic{theorem}.\arabic{subtheorem}}

\begin{document}
\section{Introduction}

\begin{theorem} 
 Yada yada yada. 
\end{theorem}   

\begin{subtheorem}   
  Yada yada yada.
\end{subtheorem}

\begin{subtheorem}   
  Yada yada yada.
\end{subtheorem}

\begin{theorem} 
 Yada yada yada. 
\end{theorem}   

\begin{subtheorem}   
  Yada yada yada.
\end{subtheorem}

\begin{subtheorem}   
  Yada yada yada.
\end{subtheorem}

\end{document} 

demo

| improve this answer | |

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.