Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to write a small note in which there are no sections, and the theorems go from 1,2,3. In the following code, for example:

\documentclass[12pt]{article}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}
\title{Some Notes}
\begin{document}
\date{}
\maketitle
\begin{definition}
 A group is defined as ...
\end{definition}
 \begin{remark}
 The concept of groups...
 \end{remark}
\end{document}

I get Definition 0.1. However I want only Definition 1 to be printed instead. Furthermore I want Remark 1, instead of Remark 0.2.

How can I accomplish this?

share|improve this question
2  
Just remove [section] and do \newtheorem{theorem}{Theorem}. –  egreg Aug 18 at 9:22

3 Answers 3

up vote 2 down vote accepted

When you do

\newtheorem{theorem}{Theorem}[section]

you're telling LaTeX that theorem environments should be numbered as

<section number>.<theorem number>

and that the theorem number must be reset when a new section comes along.

The [section] part is optional, as the syntax suggests, so you just have to do

\newtheorem{theorem}{Theorem}

Full example:

\documentclass[12pt]{article}
\newtheorem{theorem}{Theorem}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}

\begin{document}

\title{Some Notes}
\author{Me}
\date{}
\maketitle

\begin{definition}
A group is defined as ...
\end{definition}

\begin{remark}
The concept of groups...
\end{remark}

\begin{theorem}
Groups are fun.
\end{theorem}

\end{document}

enter image description here

share|improve this answer

If there is no section used, the section counter is 0, therefore the theorem enviroment prints 0.1 etc.

Since the OP has the remark as a sibling of theorem environment, it will just increment the theorem counter and the number of the 1st remark will be 0.2, not 1.

If \thetheorem and \theremark commands are redefined such that the section counter value information is removed, the output will be as desired.

\documentclass[12pt]{article}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}{Remark}[theorem]

\renewcommand{\theremark}{\arabic{theorem}}

\renewcommand{\thetheorem}{\arabic{theorem}}

\title{Some Notes}
\begin{document}
\date{}
\maketitle
\begin{definition}\label{def::1}
 A group is defined as ...
\end{definition}
 \begin{remark} \label{remark::1}
 The concept of groups...
 \end{remark}

\begin{definition}
Well....
see \ref{remark::1} as well
\end{definition}
 \begin{remark}
   In \ref{def::1} you saw%
 \end{remark}

\end{document}

enter image description here

share|improve this answer

What I simply did was (thanks to egreg):

\documentclass[12pt]{article}
\newtheorem{definition}{Definition}
\newtheorem{remark}{Remark}
\title{Some Notes}
\begin{document}
\date{}
\maketitle
\begin{definition}
A group is defined as ...
\end{definition}
\begin{remark}
The concept of groups...
\end{remark}
\end{document}

Short and what I wanted.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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