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.

How to insert a dot after the theorem environment? I use \newtheorem{exerc}{}.

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}

\usepackage{theorem}
\newtheorem{exerc}{}

\begin{document}
\begin{exerc}
 Exercise
\end{exerc}
\end{document}

I need.

  1. Exercise
  2. Exercise
share|improve this question

3 Answers 3

up vote 2 down vote accepted

Add

\renewcommand{\theexerc}{\arabic{exerc}.}% #.

just after you declare your new theorem \newtheorem{exerc}{}.

share|improve this answer
    
Thanks Werner!! –  Regis da Silva Aug 19 '11 at 16:56
7  
Generally, it's a bad idea to touch \theexerc for that sort of thing as it will also affects the \label/\ref mechanism. Using \theoremseparator{.} from the ntheorem package (which is an expansion of the theorem package) will avoid any side effect. –  Philippe Goutet Aug 19 '11 at 20:48

I usually use amsthm instead of theorem. It provides \newtheoremstyle in which you can define your own theorem styles:

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}

\usepackage{amsthm}
% the following style is based on the example
% found in the amsthm manual
\newtheoremstyle{mystyle}% name
{3pt}% space above
{3pt}% space below
{}% body font
{}% indent amount
{}% theorem head font
{.}% punctuation after theorem head
{.5em}% space after theorem head
{}% theorem head spec

\theoremstyle{mystyle}
\newtheorem{exerc}{}

\begin{document}
\begin{exerc}
Exercise
\end{exerc}
\end{document}

image

Hope it helps. =)

share|improve this answer

Below is a solution using ntheorem. As a side note, if you're making Exercises/Problems with associated solutions, you might like to look up the answers package.

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{ntheorem}

\theoremstyle{plain}
\theorembodyfont{}
\theoremsymbol{}
\theoremprework{}
\theorempostwork{}
\theoremseparator{.}
\newtheorem{exerc}{}

\begin{document}

\begin{exerc}
 Exercise
\end{exerc}

\end{document}
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.