如何在 Beamer 幻灯片的逐项列表中将要点放在定理/证明/示例/等之前

如何在 Beamer 幻灯片的逐项列表中将要点放在定理/证明/示例/等之前

我在 Ubuntu 20.04 上使用 LaTeX。我本来一切正常,然后卸载了某些程序,导致部分 LaTeX 软件包被卸载,于是我重新安装了 LaTeX 软件包,现在当我在 Beamer 中执行示例(或定义、定理或证明等)时,项目符号出现在示例之后,而不是在同一行之前。

我能做些什么来让项目符号出现在示例之前?

\documentclass{beamer}

\usepackage{amsmath,amsfonts,amssymb,amscd,enumerate,url,graphicx,wasysym}
\usepackage{movie15,MnSymbol}
\usepackage{mathrsfs}
\usepackage{diagrams}
\usepackage{beamerthemesplit}
\usepackage{accents}
\usepackage{kbordermatrix}
\usepackage{hyperref}

\beamertemplateshadingbackground{red!10}{blue!10}
\beamertemplateboldtitlepage \beamertemplatenavigationsymbolsempty
\beamertemplateboldcenterframetitle
\renewcommand{\raggedright}{\leftskip=0pt \rightskip=0pt plus 0cm }

\newenvironment{Def}{\begin{block}{Definition}}{\end{block}}
\newenvironment{Claim}{\begin{block}{Claim}}{\end{block}}
\newenvironment{Fact}{\begin{block}{Fact}}{\end{block}}
\newenvironment{Result}{\begin{block}{Result}}{\end{block}}
\newenvironment{Solution}{\begin{block}{Solution}}{\end{block}}

\renewenvironment{proof}{\begin{block}{Proof}}{\end{block}}

\renewcommand\qedsymbol{$\blacksquare$}

\newcommand{\none}[1]{}

\none{
\theoremstyle{definition}
%\newtheorem{Theorem}[theorem]{Theorem} 
\newtheorem{Thm}[theorem]{Theorem}
\newtheorem{Prop}[theorem]{Proposition}
\newtheorem{Proposition}[theorem]{Proposition}
\newtheorem{Cor}[theorem]{Corollary}
\newtheorem{Lem}[theorem]{Lemma}
\newtheorem{Conj}[theorem]{Conjecture}

\theoremstyle{definition}
\newtheorem{Def}[theorem]{Definition}
\newtheorem{Remark}[theorem]{Remark}
\newtheorem{Ex}[theorem]{Example}
\newtheorem{Claim}[theorem]{Claim}
\newtheorem{Fact}[theorem]{Fact}
}

\bibliographystyle{amsalpha}
\numberwithin{equation}{section}
\setcounter{section}{0}

\author{Dr. Jeffrey Rolland}
\institute{Math 001 - Intro to Counting \\
Department of Mathematics \\
My School}
\date{Fall, 2020}

\begin{document}

\title{Test Section}

\frame{\titlepage}

\frame
{

\frametitle{Test Frame} 

\begin{itemize}
    
    \item<+-> \begin{Example} This is an example; the bulletpoint appears after and a line below. \end{Example} 
    \item<+-> Here, the bulletpoint appears before and on the same line. I would like all bulletpoints like this one.
    
\end{itemize}
}

\end{document}

投影机框架

(抱歉,所有的包都是我复制/粘贴的。)有没有办法让示例的项目符号出现在示例之前和同一行上?

答案1

Example用 包围并minipage添加一些\vspace命令来调整位置和间距,得到以下更简约的示例:

在此处输入图片描述

\documentclass{beamer}

\usepackage{amsmath}
\theoremstyle{definition}
\newtheorem{Ex}[theorem]{Example}

\begin{document}

\begin{frame}
\frametitle{Test Frame} 

\begin{itemize}
    \item \begin{minipage}[t]{\linewidth}
            \vspace*{-1\baselineskip}
            \begin{Example} 
              This is an example; the bulletpoint appears after and a line below. 
            \end{Example}
            \vspace{0.25\baselineskip}
          \end{minipage}
    \item Here, the bulletpoint appears before and on the same line. I would like all bulletpoints like this one.
    \item the next item
\end{itemize}
\end{frame}

\end{document}

相关内容