1

I would like to define Theorem x.y say x,y are integers between 1 and 20.

Then, I need to write 400 sentences like

\newtheorem*{theorem1.1}{Theorem 1.1}.

EDIT: I'm typping some old book in a latex form which has its own theorem numbering system. To follow it, I would like to define such theorem environements a priori (using a loop sentence for example). Is there a nice way to do this?

Thanks in advance!

13
  • I am not sure I understand. Please, what you ask seem strange for me, so if you can explain your idea, what you want to do with this? may be there is better way.
    – touhami
    Commented Feb 8, 2016 at 7:32
  • Welcome to TeX.SX! Since LaTeX numbers theorems automatically, why should you want to do it by hand?
    – egreg
    Commented Feb 8, 2016 at 7:35
  • I meant that can I use a loop sentence in latex as C+ program. That's right but I want to use \begin{theorem2.5}\end{theorem2.5} right after \begin{theorem2.3}\end{theorem2.3} without using theorem2.4.
    – user156937
    Commented Feb 8, 2016 at 7:37
  • For this purpose, I would like to define theorem x.y for all x,y in {1,...,10} a priori and use them freely.
    – user156937
    Commented Feb 8, 2016 at 7:48
  • @user156937: This question is totally unclear. Defining a theorem is done with \newtheorem, but the numbering is done with \begin{foo}...\end{foo}. Your request indicates that you want to have 400 different types of theorem? What's the purpose of this?
    – user31729
    Commented Feb 8, 2016 at 7:50

1 Answer 1

1

Use a different strategy:

\newtheorem*{blurb}{Theorem \whatever}
\newcommand{\whatever}{}
\newenvironment{theorem}[1]
 {\renewcommand\whatever{#1}\begin{blurb}}
 {\end{blurb}}

so you can do

\begin{theorem}{3.25}

in your document.

1
  • This is exactly what I wanted! Thanks a lot!
    – user156937
    Commented Feb 8, 2016 at 9:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .