8

I have several questions regarding the use of definitions and theorems in the beamer package. Here is an example:

\documentclass[mathserif]{beamer}
\usepackage{graphicx}
\usepackage{tcolorbox}
\usepackage{amsthm}
\setbeamertemplate{theorems}[numbered]
\newtheorem{idea}{Proof idea}

\begin{document}
\section[test]{this is a test}
\frame{
    \begin{tcolorbox}
    \begin{definition} This is a definition. \end{definition}
    \begin{theorem} This is a theorem. \end{theorem}
    \begin{idea} This is a proof idea. \end{idea}
    \begin{proof} This is a proof. \end{proof}
    \end{tcolorbox}
}
\end{document}

I have several modifications I would like to add, but I don't really know how to do them myself in Latex.

  • I would like to have the definitions and theorems numbered separately.
  • I have added the new theorem called idea, this is also numbered. But I would like this not to be numbered.
  • The content of the new theorem idea is in italic. How can I remove this?
  • Finally, adding section or subsection in between frames does not print the section title onto the frame. Has this something to do with the default template I am using?
  • If it is possible to add sections, I would like the definitions and theorems to be numbered separately, based on the section they are in.

Thank you

  • In this question, Gonzalo Medina thoroughly explains how to customize the theorem environments. Check it out! It doesn't answer everything that you are wondering though. – Grimler Jan 2 '16 at 11:38
11

If you disable the automatic creation of Theorem blocks by beamer and do like the usual way using amsthm you can format all easily.

So, the option notheorems disable the automatic process and then you have to define the environments by yourself. Thus you can specify the style and the numbering.

\documentclass[mathserif,notheorems]{beamer} % option notheorems
\usepackage{amsthm}
\setbeamertemplate{theorems}[numbered] % to number

\theoremstyle{plain} % insert bellow all blocks you want in italic
\newtheorem{theorem}{Theorem}[section] % to number according to section

\theoremstyle{definition} % insert bellow all blocks you want in normal text
\newtheorem{definition}{Definition}[section] % to number according to section
\newtheorem*{idea}{Proof idea} % no numbered block

\usepackage{graphicx}
\usepackage{tcolorbox}

\begin{document}
\section[test]{this is a test}
\frame{
    \frametitle[short frame title]{title}
    \begin{tcolorbox}
    \begin{definition} This is a definition. \end{definition}
    \begin{theorem} This is a theorem. \end{theorem}
    \begin{idea} This is a proof idea. \end{idea}
    \begin{proof} This is a proof. \end{proof}
    \end{tcolorbox}
}
\end{document}

enter image description here

If you don't want to do by hand as above, then:

For 1: no solution yet.

For 2 and 3 use

\theoremstyle{definition}
\newtheorem*{idea}{Proof idea}

For 5 according to the user guide (pg 119), use the option envcountsect within the document class

\documentclass[mathserif,envcountsect]{beamer}

Note: 4 is not related with numbering. Just use inside the frame

\frametitle[short frame title]{title}

to insert a title for it.

  • @JNevens, I edited. Please, study it. – Sigur Jan 2 '16 at 12:13
  • I used the manual solution. Thank you for the extra comments for clarification. – JNevens Jan 2 '16 at 12:17
  • @JNevens you are welcomed. – Sigur Jan 2 '16 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.