0

In my documents, I'm currently using paragraph to create "sub titles" inside my theorems.

In preamble:

\usepackage{amsthm}
\newtheorem{deff}{Definition} 

In document:

\begin{deff}

A recipe is 

\paragraph{given}
\begin{enumerate}
\item a desired outcome
\item a language of instruction
\end{enumerate} 
\paragraph{a set of}
\begin{enumerate}
\item required inputs
\item cooking instructions 
\item sanity checks
\end{enumerate}
\paragraph{, such that}
\begin{itemize}
\item the desired outcome is achieved using inputs and instructions
\item the sanity checks verify that the cook is still sane
\end{itemize}

\end{deff}

which gives

mock output

Now, I would like to have something similar in my beamer slides. However, it appears that paragraph is not working there -- the following document creates an error (undefined control sequence):

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = pdflatexmk


\documentclass{beamer}





% add page numbers for malmoe
\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
  \oldmacro\hfill%
  \insertframenumber\,/\,\inserttotalframenumber}


\usetheme{Malmoe}
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}
\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \insertframenumber/\inserttotalframenumber
}


\usepackage{amsthm}
\newtheorem{deff}{Definition} 


\begin{document}





\begin{frame}
\begin{deff}

A recipe is 

\paragraph{given}
\begin{enumerate}
\item a desired outcome
\item a language of instruction
\end{enumerate} 
\paragraph{a set of}
\begin{enumerate}
\item required inputs
\item cooking instructions 
\item sanity checks
\end{enumerate}
\paragraph{, such that}
\begin{itemize}
\item the desired outcome is achieved using inputs and instructions
\item the sanity checks verify that the cook is still sane
\end{itemize}

\end{deff}
\end{frame}


\end{document}

I need alert{} to emphasize some of the items in the lists, so I don't want to use \alert as headlines. How else could I reproduce the above layout in beamer? Optimally, there'd be also less spacing above the headlines, or even better -- a way for me to control it.

0

1 Answer 1

1

If you want to stay with already defined commands, you could for example use \structure{}:

\documentclass{beamer}

\usetheme{Malmoe}
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}
\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \insertframenumber/\inserttotalframenumber
}

\newtheorem{deff}{Definition} 

\begin{document}

\begin{frame}
\begin{deff}

A recipe is 

\structure{given}
\begin{enumerate}
\item a desired outcome
\item a language of instruction
\end{enumerate} 
\structure{a set of}
\begin{enumerate}[a.]
\item required inputs
\item cooking instructions 
\item sanity checks
\end{enumerate}
\structure{, such that}
\begin{itemize}
\item the desired outcome is achieved using inputs and instructions
\item the sanity checks verify that the cook is still sane
\end{itemize}

\end{deff}
\end{frame}


\end{document}

Or you could create a new command and style it to fit your needs:

\documentclass{beamer}


\usetheme{Malmoe}
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}
\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \insertframenumber/\inserttotalframenumber
}

\newtheorem{deff}{Definition} 

\newcommand{\mypar}[1]{\textbf{#1}}

\begin{document}

\begin{frame}
\begin{deff}

A recipe is 

\mypar{given}
\begin{enumerate}
\item a desired outcome
\item a language of instruction
\end{enumerate} 
\mypar{a set of}
\begin{enumerate}[a.]
\item required inputs
\item cooking instructions 
\item sanity checks
\end{enumerate}
\mypar{, such that}
\begin{itemize}
\item the desired outcome is achieved using inputs and instructions
\item the sanity checks verify that the cook is still sane
\end{itemize}

\end{deff}
\end{frame}


\end{document}

You must log in to answer this question.

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