3

I wrote a theorem in beamer with \enumerate. Then I need to write "Idea of proof of 1", with "1" which should be written the same way it appears in the theorem, ie a blue dot with a 1 inside. Also "1" must be written next to "Idea of proof of" and not at the head.

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\title{example}
\author[...]{...}
\usetheme{AnnArbor}
\useoutertheme[right]{sidebar}
\setbeamercovered{dynamic}
\theoremstyle{definition}
\newtheorem{definizione}{Definizione}
\theoremstyle{plain}
\newtheorem{theoremmm}{Theorem}

\begin{document}

\begin{frame} \begin{theoremmm} \begin{enumerate} \item ... \item ... \end{enumerate} \end{theoremmm}

Idea of proof of 1

\end{frame} \end{document}

enter image description here

What written here (enumerate in itemize environment, no new line) solves my problem in LaTex, but the proposed solutions use \ enumitem, which does not work in Beamer.

2 Answers2

9

You can use \usebeamertemplate{enumerate item} to show item label, for numbering the template use enumi counter.

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\title{example}
\author[...]{...}
\usetheme{AnnArbor}
\useoutertheme[right]{sidebar}
\setbeamercovered{dynamic}
\theoremstyle{definition}
\newtheorem{definizione}{Definizione}
\theoremstyle{plain}
\newtheorem{theoremmm}{Theorem}

\newcommand{\itemnum}[1]{% \setcounter{enumi}{#1}\usebeamertemplate{enumerate item}% }

\begin{document}

\begin{frame} \begin{theoremmm} \begin{enumerate} \item ... \item ... \end{enumerate} \end{theoremmm}

Idea of proof of \itemnum{1} ...

\end{frame} \end{document}

Salim Bou
  • 17,021
  • 2
  • 31
  • 76
2

The enumerate bullet is defined in the beamer source code in the file beamerbaseauxtemplates.sty. You can copy the code from there and use it in a new command, where you supply an argument instead of the enumerate counter. The commands are listed as \defbeamertemplate{enumerate item}{ball} for the sphere, \defbeamertemplate{enumerate item}{circle} for the circle, and \defbeamertemplate{enumerate item}{square} for the square template.

For the circle template there is an additional font setting (with a \usebeamerfont command). You need to add a group (a pair of {} within the command) to prevent the font setting from taking effect outside of the command.

MWE:

\documentclass{beamer}

% sphere shape \newcommand{\enumbullet}[1]{% \begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex} \usebeamercolor{item projected} {\pgftransformscale{1.75}\pgftext{\normalsize\pgfuseshading{bigsphere}}} {\pgftransformshift{\pgfpoint{0pt}{0.5pt}} \pgftext{% \usebeamerfont*{item projected}% \color{fg}#1}} \end{pgfpicture}% }

% circle shape \newcommand{\enumcircle}[1]{% {\usebeamerfont*{item projected}% \usebeamercolor[bg]{item projected}% \begin{pgfpicture}{-1ex}{0ex}{1ex}{2ex} \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} \pgfusepath{fill} \pgftext[base]{\color{fg}#1} \end{pgfpicture}}% }

\usepackage[english]{babel} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \title{example} \author[...]{...} \usetheme{AnnArbor} \useoutertheme[right]{sidebar} \setbeamercovered{dynamic} \theoremstyle{definition} \newtheorem{definizione}{Definizione} \theoremstyle{plain} \newtheorem{theoremmm}{Theorem}

\begin{document}

\begin{frame} \begin{theoremmm} \begin{enumerate} \item ... \item ... \end{enumerate} \end{theoremmm}

Idea of proof of \enumbullet{1} and \enumbullet{2}

\end{frame}

\setbeamertemplate{enumerate item}[circle] \begin{frame} \begin{theoremmm} \begin{enumerate} \item ... \item ... \end{enumerate} \end{theoremmm}

Idea of proof of \enumcircle{1} and \enumcircle{2}

\end{frame}

\end{document}

Result:

enter image description here

enter image description here

Marijn
  • 37,699