The normal LaTeX input and output would be something like

\subsection{Theorem (Fundamental Theorem of Calculus)}

1.1 Theorem (Fundamental Theorem of Calculus)

Is there any way to use a \subsection function with two arguments like

\subsection**{Theorem}{Fundamental Theorem of Calculus}

and have it output

Theorem 1.1 | Fundamental Theorem of Calculus


THEOREM 1.1 | Fundamental Theorem of Calculus

or something like that?

I need some way of doing this that will still catalogue everything in the table of contents.

As far as I can tell, the titlesec package is not capable of doing this, but it seems like something a lot of people would want to be able to do.


1 Answer 1


Instead of using \subsection, to build your theorem-like structures use a dedicated package. There are two popular packages: amsthm and ntheorem (and a front-end for both: thmtools). Here's a little example with a simple definition using amsthm:




\begin{theo}[Fundamental Theorem of calculus]
Let $f$ be a continuous real-valued function defined on a closed interval $[a, b]$. Let $F$ be the function defined...


enter image description here

Both packages offer you some predefined styles and the possibility to define your own.

To add an entry to the ToC, add

\addcontentsline{toc}{subsection}{Fundamental Theorem of calculus}
  • Thank you so much. This is exactly what I was looking for. EDIT: One question - how would you make the theorems number 1.1, 1.2, etc. or 1.1.1, etc.? May 9, 2013 at 5:43
  • @ChrisMiddleton Since this answer helped you, please upvote it by clicking on the up arrow button beside this question.
    – hpesoj626
    May 9, 2013 at 7:12
  • @hpesoj626 I tried to do that when I first saw it, but I don't have enough reputation to do that yet. It says I need 15 reputation. (Not really sure how that works.) EDIT: I did just click the check mark, since I'm allowed to do that. May 9, 2013 at 7:26
  • @ChrisMiddleton Oh, yes. Right. Welcome to TeX.SE!
    – hpesoj626
    May 9, 2013 at 9:51
  • @ChrisMiddleton and what represents each digit in 1.1.1, for example? Do they correspond to chapter, section, theorem? Which document class are you using? May 9, 2013 at 18:04

You must log in to answer this question.

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