Beamer 环境中围绕项目的框

Beamer 环境中围绕项目的框

我想在本幻灯片的主要项目结构的最后一项(以“设置...”开头的项目)周围放置一个方框。有什么帮助吗?

\documentclass{beamer}
\usepackage{etex}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{xcolor}
\usepackage{bbm}
\usepackage{framed}
\usepackage{subfig}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{enumerate}
\usepackage{mathrsfs}
\usepackage{appendixnumberbeamer}
\usepackage{bigints}
\usepackage{mathabx}
\usepackage[gen]{eurosym}
\usepackage[all]{xy}
\newcommand{\Def}{\color[rgb]{0,0,0}} %Black%
\newcommand{\Blue}{\color[rgb]{0,0,1}}
\newcommand{\Dblue}{\color[rgb]{0,0,.6}}
\newcommand{\Dred}{\color[rgb]{.6,0,0}}



%--------------------------------------------------------------

\title{Hello}
\author{blah1}
\vfill
\date{today}

%--------------------------------------------------------------
%--------------------------------------------------------------
\begin{document}
\begin{frame}{Strategy}
\small
\begin{itemize}
\item Blah1
\vspace{0.2cm}
\item Blah2\\
Blah3
\vspace{0.2cm}
\item Other assumptions on {\Blue A} I play with: 
\begin{enumerate}[i]
\item Blah1\\
Blah2
\item Blah3
\item Blah4
\end{enumerate}
\vspace{0.2cm}
\item Characterisations of B
\vspace{0.2cm}
\item {\Blue Set} by applying the AU bounds to {\Blue $E$} {\color{orange}{$\forall j\in \mathcal{N}$}} {\color{magenta}{(for any $j\in \mathcal{N}$)}}: 
\begin{itemize}
\item Computational tractability from T Theorem and constructive algorithm of P
\item Equivalent to the region obtained by applying the PO bounds to {\Blue $G$} under {\color{orange}{i}} {\color{magenta}{(i-iii)}}
\end{itemize}
\end{itemize}
\end{frame}

\end{document}

答案1

基于在 itemize 环境中将几个不同的项目放在一个框内

\documentclass[10pt,xcolor=table]{beamer}

\usepackage{etex}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{bbm}
\usepackage{framed}
\usepackage{subfig}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{enumerate}
\usepackage{mathrsfs}
\usepackage{appendixnumberbeamer}
\usepackage{bigints}
\usepackage{mathabx}
\usepackage[gen]{eurosym}
\usepackage[all]{xy}
\newcommand{\Def}{\color[rgb]{0,0,0}} %Black%
\newcommand{\Blue}{\color[rgb]{0,0,1}}
\newcommand{\Dblue}{\color[rgb]{0,0,.6}}
\newcommand{\Dred}{\color[rgb]{.6,0,0}}

\usepackage{tikz}
\usepackage{twoopt}
\usetikzlibrary{calc}

\makeatletter
\tikzset{%
    remember picture with id/.style={%
        remember picture,
        overlay,
        save picture id=#1,
    },
    save picture id/.code={%
        \edef\pgf@temp{#1}%
        \immediate\write\pgfutil@auxout{%
            \noexpand\savepointas{\pgf@temp}{\pgfpictureid}}%
    },
    if picture id/.code args={#1#2#3}{%
        \@ifundefined{save@pt@#1}{%
            \pgfkeysalso{#3}%
        }{
        \pgfkeysalso{#2}%
    }
}
}

\def\savepointas#1#2{%
    \expandafter\gdef\csname save@pt@#1\endcsname{#2}%
}

\def\tmk@labeldef#1,#2\@nil{%
    \def\tmk@label{#1}%
    \def\tmk@def{#2}%
}

\tikzdeclarecoordinatesystem{pic}{%
    \pgfutil@in@,{#1}%
    \ifpgfutil@in@%
    \tmk@labeldef#1\@nil
    \else
    \tmk@labeldef#1,(0pt,0pt)\@nil
    \fi
    \@ifundefined{save@pt@\tmk@label}{%
        \tikz@scan@one@point\pgfutil@firstofone\tmk@def
    }{%
    \pgfsys@getposition{\csname save@pt@\tmk@label\endcsname}\save@orig@pic%
    \pgfsys@getposition{\pgfpictureid}\save@this@pic%
    \pgf@process{\pgfpointorigin\save@this@pic}%
    \pgf@xa=\pgf@x
    \pgf@ya=\pgf@y
    \pgf@process{\pgfpointorigin\save@orig@pic}%
    \advance\pgf@x by -\pgf@xa
    \advance\pgf@y by -\pgf@ya
}%
}
\makeatother
\newcommand\tikzmark[2][]{%
    \tikz[remember picture with id=#2] #1;}

\newcommandtwoopt\DrawBox[4][][-\labelwidth+\labelsep]{%
    \begin{tikzpicture}[overlay,remember picture]
    \draw[red,#1]
    ($(pic cs:#3)+(-0.2em+#2,0.9em)$) rectangle
    ($(pic cs:#4)+(0.2em,-0.3em)$);
    \end{tikzpicture}}

\begin{document}

    \begin{frame}{Strategy}
        \only<2->{\DrawBox[thick, green!50!black, fill=green!80!black]{lefta}{righta}}
        \small
        \begin{itemize}
            \item Blah1
            \vspace{0.2cm}
            \item Blah2\\
            Blah3
            \vspace{0.2cm}
            \item Other assumptions on {\Blue A} I play with: 
            \begin{enumerate}[i]
                \item Blah1\\
                Blah2
                \item Blah3
                \item Blah4
            \end{enumerate}
            \vspace{0.2cm}
            \item Characterisations of B
            \vspace{0.2cm}
            \item \tikzmark{lefta} {\Blue Set} by applying the AU bounds to {\Blue $E$} {\color{orange}{$\forall j\in \mathcal{N}$}} {\color{magenta}{(for any $j\in \mathcal{N}$)}}:           
            \begin{itemize}
                \item Computational tractability from T Theorem and constructive algorithm of P
                \item Equivalent to the region obtained by applying the PO bounds to {\Blue $G$} under {\color{orange}{i}} {\color{magenta}{(i-iii)}}\hfill\tikzmark{righta}
            \end{itemize}

        \end{itemize}
    \end{frame}

\end{document}

在此处输入图片描述

相关内容