Beamer:定义不在块中

Beamer:定义不在块中

在我的 Beamer 演示文稿中,我想像在 Article 环境中一样编写定义,这样就无需块。我该怎么做?

\documentclass[10pt,aspectratio=169]{beamer}
\usetheme{Frankfurt}

\usefonttheme{serif}

% cancel navigation symbols
\setbeamertemplate{navigation symbols}{}

\setbeamercovered{transparent}

\RequirePackage{tikz}
\RequirePackage{xcolor}
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{verbatim}
\RequirePackage{hyperref}
\RequirePackage{listings}
\usepackage{tikz}
\usetikzlibrary{3d}

\usepackage{cancel}
\usepackage{ amssymb }
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{mathabx}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{prop}[thm]{Proposition}

\theoremstyle{definition}
\newtheorem{defi}[thm]{Definition}
\newtheorem{ex}[thm]{Example}
\newtheorem{rk}[thm]{Remark}
\newtheorem{notation}[thm]{Notation}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{ass}[thm]{Assumption}
\newtheorem{conv}[thm]{Convention}
\newtheorem*{openp}{Open Problem}
\newtheorem*{Theorem*}{Conjecture}

\definecolor{polyured}{HTML}{A02337}
\definecolor{polyured2}{HTML}{A63547}
\definecolor{polyugrey}{HTML}{58595B}
\definecolor{skyblue}{HTML}{6BA4B8}
\definecolor{yareblue}{HTML}{0F4D92}

\setbeamercolor{title}{fg=white}
\setbeamercolor{author}{fg=white}
\setbeamercolor{date}{fg=white}
\setbeamercolor{head}{bg=yareblue}

\setbeamercolor{alerted text}{fg=yareblue}
\setbeamercolor{normal text}{fg=darkgray,bg=white}
\setbeamercolor{structure}{fg=yareblue}

\setbeamercolor{jumbo}{bg=yareblue}
\setbeamercolor{progress bar}{fg=yareblue,bg=polyugrey}
\setbeamercolor{progress bar progress}{use=progress bar,bg=progress bar.fg}

\hypersetup{
    colorlinks,
    linkcolor=yareblue,
    anchorcolor=red,
    citecolor=blue!80,
    urlcolor=skyblue,
}
\setbeamerfont{author}{size=\small}
\setbeamerfont{date}{size=\footnotesize}
\setbeamerfont{title}{series=\bfseries, size=\Large}
\setbeamerfont{subtitle}{series=\mdseries,size=\normalsize}

% prettier boxes
\setbeamertemplate{blocks}[rounded]

\setbeamerfont{frametitle}{series=\bfseries}
\setbeamerfont{framesubtitle}{series=\mdseries}
\setbeamerfont{footline}{size=\scriptsize}
\setbeamerfont{block title}{series=\centering, size=\normalsize}
\setbeamerfont{block body}{size=\small}

\setbeamercolor{block body alerted}{bg=alerted text.fg!10}
\setbeamercolor{block title alerted}{bg=alerted text.fg!20}

\setbeamercolor{block body}{bg=yareblue!10}
\setbeamercolor{block title}{bg=yareblue!90}

\setbeamercolor{block body example}{bg=green!10}
\setbeamercolor{block title example}{bg=green!20}

%biblio & cite
\usepackage[backend=biber]{biblatex}
%\bibliographystyle{ieeetr}
\addbibresource{biblio.bib}

\setbeamerfont{footnote}{size=\tiny} %reduce the size of the footnote citation

\setbeamertemplate{bibliography item}{\insertbiblabel}  % Add numbered list of references in the end

% headline for all frames
\setbeamertemplate{headline}{
    \ifnum\theframenumber=1
        % not display the headline for the title page
    \else
        \begin{beamercolorbox}[wd=\paperwidth,ht=40pt]{head} %barra superiore
            \hspace{410pt}\vspace{3pt}\includegraphics[width=35pt]{source/LOGO bianco ale.png}
        \end{beamercolorbox}
    \fi
}

\newenvironment{withoutheadline}{
    \setbeamertemplate{headline}[default]
    \def\beamer@entrycode{\vspace*{-\headheight}}
    }{}


\AtBeginSection[]
{
  \begin{frame}{Table of Contents}
    \begin{picture}(0,0)
            \put(243,-167){\includegraphics[width=215pt]{source/LOGO grigio3.png}}
        \end{picture}
    \tableofcontents[currentsection, hideothersubsections]
  \end{frame}
}

% style of sections and subsections in ToCs
\setbeamertemplate{section in toc}{
    $\blacktriangleright$~\inserttocsection
}

\setbeamertemplate{subsection in toc}[square]
% \setbeamertemplate{frametitle continuation}{}

\title{Constructing Cryptographic\\ Accumulators from Key\\ Exchange Protocols}
% \subtitle{Design Accumulators on Key Exchange Protocols}
\author{Diana}
\date{May 24, 2023}

\begin{document}

\maketitle


\begin{frame}
    \begin{defi}
    A function $f: X\times Y\to X$ is said to be \textit{quasi-commutative} if for all $x\in X$ and for all $y_1, y_2\in Y$
    $$
        f(f(x,y_1),y_2)=f(f(x,y_2),y_1).
    $$\end{defi}
\end{frame}

\end{document}

我正在写什么

\begin{frame}
    \begin{defi}
    A function $f: X\times Y\to X$ is said to be \textit{quasi-commutative} if for all $x\in X$ and for all $y_1, y_2\in Y$
    $$
        f(f(x,y_1),y_2)=f(f(x,y_2),y_1).
    $$\end{defi}
\end{frame}

我拥有的

我希望拥有的东西(可能没有编号) 我希望拥有的东西(可能没有编号)

答案1

您可以像这样重新定义theorem begin和模板:theorem end

\documentclass[10pt,aspectratio=169]{beamer}
\usetheme{Frankfurt}
\usefonttheme{serif}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\theoremstyle{definition}
\newtheorem{defi}[thm]{Definition}

\makeatletter
\setbeamertemplate{theorem begin}{%
    \par
    \textbf{\inserttheoremname
    \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi:}
}

\setbeamertemplate{theorem end}{\par}
\makeatother

\begin{document}

\begin{frame}
    \begin{defi}
    A function $f: X\times Y\to X$ is said to be \textit{quasi-commutative} if for all $x\in X$ and for all $y_1, y_2\in Y$
    \[
        f(f(x,y_1),y_2)=f(f(x,y_2),y_1).
    \]
    \end{defi}
\end{frame}


\end{document}

在此处输入图片描述

相关内容