When we write a theorem in beamer, by default the theorem name and theorem content are in different lines, like this:
|-------------------------------------------
|Theorem 1
|-------------------------------------------
|Some theorem content.
|-------------------------------------------
How to make the theorem name and theorem content show in the same line? like this:
|---------------------------------------------
|Theorem 1: Some theorem content.
|---------------------------------------------
Best Answer
beamer
provides a means to modify the start and end of atheorem
environment by setting the appropriate template. The start of thetheorem
environment template is defined withintheorem begin
, and the end in the templatetheorem end
:\inserttheoremheadfont
formats the header as\bfseries
. If you want to modify this (and add some colour or perhaps even a different style (\itshape
, say), input it directly as needed. Ending in\normalfont
switches back to the normal font shape for typesetting the remainder of thetheorem
content.\inserttheoremname
insertsTheorem
, while\inserttheoremnumber
inserts the theorem number. Whatever is specified as the optional argument totheorem
is considered as a "theorem addition", and is inserted using\inserttheoremaddition
. Punctuation, if any, is provided by\insertpunctuation
(default is a period.
).The redefinition of
theorem end
is also required. In this case, it is left empty.