
親愛的 TeX 用戶,我有一段時間沒有使用 LaTeX,但需要準備一個 Beamer 演示文稿,為每個框架顯示兩個「迷你框架」:第一個比第二個小。我嘗試過玩迷你頁,但沒有成功——我生鏽了!我附上簡報的架構。您能否告訴我需要添加什麼以及在一個框架中顯示兩個框架的位置,同時使一個框架比另一個框架小?參見上面的草圖。預先非常感謝您。菲利波
\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
= 左下角)。第二個強制參數給出了包裹內容的迷你頁的寬度。