如何在 beamer 中定义问题?

如何在 beamer 中定义问题?

我想在 beamer 类中定义一个问题。请参阅下面给出的图像。

到目前为止我已经能做这么多了:

\documentclass{beamer}

% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%
\mode<presentation>
{
  \usetheme{Madrid}       % or try default, Darmstadt, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{serif}    % or try default, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
} 

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{chemfig}
\usepackage[version=3]{mhchem}



% On Overleaf, these lines give you sharper preview images.
% You might want to `comment them out before you export, though.
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[%
  physical paper width=8in, physical paper height=6in]

% Here's where the presentation starts, with the info for the title slide
\title[Molecules in \LaTeX{}]{Faster Algorithm }
\author{xxx \\~\\ ires}
\date{\today}










\begin{document}
\begin{frame}

Problem Name \\
Input : A graph $G$. \\

Output : Set $S$

\end{frame}


\end{document}

在此处输入图片描述

我没有找到这个“问题定义”环境有帮助的

答案1

为什么不使用投影机block来实现这个呢?

\documentclass{beamer}
\mode<presentation>
{
  \usetheme{Madrid}       % or try default, Darmstadt, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{serif}    % or try default, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
} 


\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[%
  physical paper width=8in, physical paper height=6in]

% Here's where the presentation starts, with the info for the title slide
\title[Molecules in \LaTeX{}]{Faster Algorithm }
\author{xxx \\~\\ ires}
\date{\today}

\begin{document}
\begin{frame}
\begin{center}
\begin{minipage}{5cm}
\begin{block}{\textbf{Problem Name}:}
\begin{tabular}{@{}l@{}cl}
Input &:& A graph $G$\\ 
Output &:& Set $S$
\end{tabular}
\end{block}
\end{minipage}
\end{center}
\end{frame}

在此处输入图片描述

相关内容