亲爱的 TeX 用户,我有一段时间没用过 LaTeX 了,但需要准备一个 Beamer 演示文稿,每个框架显示两个“迷你框架”:第一个比第二个小。我试过使用迷你页面,但没有成功——我生疏了!我附上了一份演示文稿的示意图。你能告诉我需要添加什么,以及在哪里显示一个框架中的两个框架,同时让一个框架比另一个框架小吗?见上面的草图。提前谢谢您。Filippo
\documentclass[english]{beamer}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage[authoryear]{natbib}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
% this default might be overridden by plain title style
\newcommand\makebeamertitle{\frame{\maketitle}}%
% (ERT) argument for the TOC
\AtBeginDocument{%
\let\origtableofcontents=\tableofcontents
\def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
\def\gobbletableofcontents#1{\origtableofcontents}
}
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usetheme{Berlin}
\date{}
\definecolor{White}{RGB}{255,255,255}
\definecolor{Black}{RGB}{30,30,30}
\definecolor{Green}{RGB}{0,255,0}
\setbeamertemplate{footline}[frame number]
\setbeamerfont{section in head/foot}{family=\tt}
\setbeamerfont{author}{family=\tt}
\setbeamerfont{institute}{family=\tt}
\setbeamerfont{structure}{family=\tt}
\setbeamerfont{frametitle}{family=\tt}
\setbeamerfont{page number in head/foot}{family=\tt}
\setbeamerfont{normal text}{family=\tt}
\setbeamerfont{item}{family=\tt}
\setbeamercolor{page number in head/foot}{bg=White,fg=Green}
\setbeamercolor{frametitle}{bg=Black,fg=Green}
\setbeamercolor{structure}{bg=White,fg=Black}
\makeatother
\usepackage{babel}
\begin{document}
\author{\textcolor{black}{BLA}}
\title{\textcolor{green}{BLA}}
\institute{BLA}
\makebeamertitle
\AtBeginSection[]{ \frame<beamer>{ \frametitle{Outline} \tableofcontents[currentsection,subsections] } } \begin{frame}{Outline} \pdfbookmark[0]{Contents}{toc} \tableofcontents{} \end{frame}
\section{Disgust 101}
\begin{frame}{1/4}
\begin{itemize}
\item \texttt{Basic emotion}
\item \texttt{Universal disgust}
\item \texttt{Charles Darwin. The expression of emotions in man and animals. 1872/1892}
\item \texttt{Paul Ekman }\texttt{\emph{et al.}}\texttt{ Emotion in the
human face. 1972}
\end{itemize}
\end{frame}
\begin{frame}{2/4}
\begin{itemize}
\item \texttt{Feral children}
\item \texttt{Lucien Malson and Jean Itard. Wolf children and the problem
of human nature. 1972}
\item \texttt{Non-universality of the disgusting}
\item \texttt{Language}
\item \texttt{Unique to humans (?)}
\item \texttt{Late onset}
\end{itemize}
\end{frame}
\end{document}
答案1
有或没有block
。
\begin{frame}{1/4}
\hfill
\begin{minipage}[c]{0.3\linewidth}
\begin{block}{Small block}
\begin{itemize}
\item One
\item Two
\end{itemize}
\end{block}
\end{minipage}%
\hfill%
\begin{minipage}[c]{0.5\linewidth}
\begin{block}{Large block}
\begin{itemize}
\item \texttt{Basic emotion}
\item \texttt{Universal disgust}
\item \texttt{Charles Darwin. The expression of emotions in man and animals. 1872/1892}
\item \texttt{Paul Ekman }\texttt{\emph{et al.}}\texttt{ Emotion in the
human face. 1972}
\end{itemize}
\end{block}
\end{minipage}
\hfill
\end{frame}
\begin{frame}{1/4}
\hfill
\begin{minipage}[c]{0.3\linewidth}
\begin{itemize}
\item One
\item Two
\end{itemize}
\end{minipage}%
\hfill%
\begin{minipage}[c]{0.5\linewidth}
\begin{itemize}
\item \texttt{Basic emotion}
\item \texttt{Universal disgust}
\item \texttt{Charles Darwin. The expression of emotions in man and animals. 1872/1892}
\item \texttt{Paul Ekman }\texttt{\emph{et al.}}\texttt{ Emotion in the
human face. 1972}
\end{itemize}
\end{minipage}
\hfill
\end{frame}
的替代方案minipage
是内置环境columns
。然后可以通过以下代码生成上面两张幻灯片中的第一张。
\begin{frame}{1/4}
\begin{columns}
\begin{column}{0.3\linewidth}
\begin{block}{Small block}
\begin{itemize}
\item One
\item Two
\end{itemize}
\end{block}
\end{column}
\begin{column}{0.5\linewidth}
\begin{block}{Large block}
\begin{itemize}
\item \texttt{Basic emotion}
\item \texttt{Universal disgust}
\item \texttt{Charles Darwin. The expression of emotions in man and animals. 1872/1892}
\item \texttt{Paul Ekman }\texttt{\emph{et al.}}\texttt{ Emotion in the
human face. 1972}
\end{itemize}
\end{block}
\end{column}
\end{columns}
\end{frame}
答案2
再次编辑:对于任意内容组合,我建议定义一个自定义环境,例如像这样:
\documentclass{beamer}
\usepackage{tikz, graphicx, environ}
\NewEnviron{subframe}[3][base west]{\node[anchor=#1, draw=black, inner sep=5pt] at (#2) {\begin{minipage}{#3}\BODY\end{minipage}};}
\begin{document}
\begin{frame}\frametitle{A frame with two subframes}
\begin{tikzpicture}
\begin{subframe}{0,1.5in}{2in}
Some text here, as well as an itemized list:
\begin{itemize}
\item one
\item two
\item three
\end{itemize}
\end{subframe}
\begin{subframe}{1.5in,0in}{2.5in}
Some graphics here:
\includegraphics[scale=0.8,clip,trim=0 0 1.525in 0]{/data/graphics/fun/asterix/switzerland-red-cross}
\end{subframe}
\end{tikzpicture}
\end{frame}
\end{document}
环境的第一个强制参数subframe
是 中的坐标tikzpicture
,可选参数指定相对于该位置的对齐方式(默认为base west
= 左下角)。第二个强制参数给出包裹内容的小页面的宽度。