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 want to display a theorem title, it is simple:

\begin{theorem}[Name]

I get

Theorem 4.5 (Name).

but I don't like the dot at the end. I want it to look like this:

Theorem 4.5. (Name)

Can you help me with that?

share|improve this question
1  
Welcome to TeX.SE! It would be best if you could provide a MWE in particular, please include the packages you use to create your theorems (amsthm?, thmtools? ntheorem? other?). Welcome! –  cmhughes Oct 27 '12 at 18:04
add comment

1 Answer

up vote 5 down vote accepted

The amsthm package allows you to define custom theorem styles, with custom heading specifications. To get the formatting you desire, you can define a new style, say custom, and then declare a theorem environment using that style. Here's an example:

\documentclass{article}
\usepackage{amsthm}

% Create a `custom` theorem style.
\newtheoremstyle{custom}
  {\topsep}   % Space above
  {\topsep}   % Space below
  {\itshape}  % Body font
  {0pt}       % Indent amount (empty value is the same as 0pt)
  {\bfseries} % Theorem head font
  {}          % Punctuation after theorem head
  {5pt plus 1pt minus 1pt} % Space after theorem head
  {\thmname{#1}\thmnumber{ #2}.\thmnote{ (#3)}} % Theorem head spec

% Create a `theorem` environment using the `custom` style.
\theoremstyle{custom}
\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}[Name]
This is the new theorem environment.
\end{theorem}

\end{document}
share|improve this answer
add comment

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.