I am trying to use the theorem environment in my work as Sample Problem.

This is my MWE:



\newtheorem{mythm}{Sample Problem}[chapter]

\chapter{New Chapter}
    Problem statement goes here. But, where does go title?

And the output,

enter image description here

Actually, I need something like this,

enter image description here

In other words, my Sample Problem lacks a Title.

How can I include a title within the theorem environment?

2 Answers 2


Here's a solution with thmtools, which eases defining new theorem styles:

\usepackage[utf8]{inputenc} \usepackage{fourier, erewhon, cabin}
\usepackage[table, x11names]{xcolor} \usepackage{mathtools}
\usepackage{amsthm, thmtools}
\usepackage{microtype} \SetTracking[no ligatures = {f}]{encoding = *}{50}
within=chapter, headpunct={\medskip}, postheadspace=\newline, notefont=\color{black}\mdseries, notebraces = {\quad}{},spaceabove = 8pt,spacebelow = 8pt]%

\declaretheorem[name=Sample Problem, style=sample]{mypb}



\begin{mypb}[Adding vectors in a drawing, orienteering]
  Show the following assertion is true: %
    a = a


enter image description here

  • thmtools package uses more understandable semantics than amsthm. Isn't it?
    – Shaqpad
    May 2, 2016 at 15:43
  • I agree with you. Amsthm is OK for simple modifications, but it's better to supplement it with thmtools for more complex layouts. Anyway, personally, I use ntheorem, which is also easier to customise and has an automatic placement of end-of-proof symbols.
    – Bernard
    May 2, 2016 at 15:48

The title goes in squared brackets at the beginning of the theorem.

\begin{mythm}[Here goes the title]
Problem statement goes here. But, where does go title?

This is what it looks like

It doesn't look exactly what your example picture looks like, but as the "Sample Problem 3.1" text is bold making the title also bold wouldn't benefit readability.

  • Could you please add a brief explanation?
    – ienissei
    May 2, 2016 at 8:37
  • yes, of course, I hoped it would be self explanatory.
    – BenjaminH
    May 2, 2016 at 8:49
  • @BenjaminH Thanks, but I guess this argument is for theorem source citation and the parentheses are redundant.
    – Shaqpad
    May 2, 2016 at 8:50
  • I've seen this usage a lot at my institute. Your question has been asked here and was answered the same way. So I suppose this is the way to go.
    – BenjaminH
    May 2, 2016 at 9:08

You must log in to answer this question.

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