我最初有一个列表,itemize
我想把它放在左边,还有一个由 创建的“图例”,tabular
我想把它放在演示文稿幻灯片的右下角。后来,我了解到这wraptable
不适用于列表 ( itemize
),所以我把列表也改成了表格,现在我使用minipage
s 将两个表格左右对齐。但是,对齐是垂直的(从上到下),不太合适。我意识到如果一tabular
列有使其变宽的文本,minipage
似乎不会覆盖它(我怀疑)。有人有巧妙的方法让图例“Clusters”位于右下角吗?请参阅下面的代码。
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{movie15, xcolor, multicol, amsmath, graphicx, subfigure, float, wrapfig}
\mode<presentation> {
\usetheme{Warsaw}
\usecolortheme{beaver}
\usefonttheme{serif}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\def\clusterA{\hfill\rlap{\hspace{0cm}\textcolor{blue}{$\bigstar$}}}
\def\clusterB{\hfill\rlap{\hspace{0cm}\textcolor{red}{$\bigstar$}}}
\def\clusterC{\hfill\rlap{\hspace{0cm}\textcolor{green}{$\bigstar$}}}
\begin{frame}{DSM-5 Comorbidity Clusters}
\begin{minipage}{0.74\textwidth}
\begin{tabular}{|r l l|}
\clusterA & Neurodevelopmental Disorders (ID, ADHD, ASD) & \\
\clusterA & Schizophrenia Spectrum/Psychotic Disorders (SZ) & I \\
\clusterB & Bipolar Disorders (I, II) & I\\
\clusterB & Depressive Disorders (MDD) & I\\
\clusterB & Anxiety Disorders (GAD, Phobias, Panic) & I \\
\clusterB & Obsessive-Compulsive Disorders (OCD) & I \\
\clusterB & Trauma \& Stress-Related Disorders (PTSD) & I \\
& Dissociative Disorders (DID) & I \\
& Somatic Symptom Disorders & III
\end{tabular}
\end{minipage}
\begin{minipage}{0.24\textwidth}
\begin{table}[]
\begin{tabular}{|c c|} \hline
\multicolumn{2}{|c|}{Clusters} \\
\hline
\clusterA & A \\
\clusterB & B \\
\clusterC & C \\
\hline
\end{tabular}
\end{table}
\end{minipage}
\end{frame}
注意:我已尝试了选项中的\textwidth
和,但没有任何变化。请参阅下图了解当前布局。同样,我希望 Clusters 图例位于页面右下角 20% 处,第一个表格向左对齐,为右下角的第二个表格留出空间。\linewidth
minipage
[[注意::不要关注表格中的文字 - 它们可能不准确/它们是我在研究之前的最佳猜测。]]
答案1
您可以省去minipage
s;使用tabular
with b
(底部)对齐方式就足够了,其中中心列是段落类型p{<length>}
(从而允许文本换行)并且不会在tabular
和图例之间留下空行:
代码:
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{movie15, multicol, float, wrapfig}
\usepackage{array}
\mode<presentation> {
\usetheme{Warsaw}
\usecolortheme{beaver}
\usefonttheme{serif}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\def\clusterA{\hfill\rlap{\hspace{0cm}\textcolor{blue}{$\bigstar$}}}
\def\clusterB{\hfill\rlap{\hspace{0cm}\textcolor{red}{$\bigstar$}}}
\def\clusterC{\hfill\rlap{\hspace{0cm}\textcolor{green}{$\bigstar$}}}
\begin{document}
\begin{frame}{DSM-5 Comorbidity Clusters}
\begin{tabular}[b]{|r >{\raggedright}p{6.5cm} l|}
\clusterA & Neurodevelopmental Disorders (ID, ADHD, ASD) & \\
\clusterA & Schizophrenia Spectrum/Psychotic Disorders (SZ) & I \\
\clusterB & Bipolar Disorders (I, II) & I\\
\clusterB & Depressive Disorders (MDD) & I\\
\clusterB & Anxiety Disorders (GAD, Phobias, Panic) & I \\
\clusterB & Obsessive-Compulsive Disorders (OCD) & I \\
\clusterB & Trauma \& Stress-Related Disorders (PTSD) & I \\
& Dissociative Disorders (DID) & I \\
& Somatic Symptom Disorders & III
\end{tabular}\hfill
% <- important to preven ending the paragraph
\begin{tabular}{|c c|} \hline
\multicolumn{2}{|c|}{Clusters} \\
\hline
\clusterA & A \\
\clusterB & B \\
\clusterC & C \\
\hline
\end{tabular}
\end{frame}
\end{document}
声明两个 s 的底部对齐方式tabular
:
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{movie15, xcolor, multicol, amsmath, graphicx, subfigure, float, wrapfig}
\usepackage{array}
\mode<presentation> {
\usetheme{Warsaw}
\usecolortheme{beaver}
\usefonttheme{serif}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\def\clusterA{\hfill\rlap{\hspace{0cm}\textcolor{blue}{$\bigstar$}}}
\def\clusterB{\hfill\rlap{\hspace{0cm}\textcolor{red}{$\bigstar$}}}
\def\clusterC{\hfill\rlap{\hspace{0cm}\textcolor{green}{$\bigstar$}}}
\begin{document}
\begin{frame}{DSM-5 Comorbidity Clusters}
\begin{tabular}[b]{|r >{\raggedright}p{6.5cm} l|}
\clusterA & Neurodevelopmental Disorders (ID, ADHD, ASD) & \\
\clusterA & Schizophrenia Spectrum/Psychotic Disorders (SZ) & I \\
\clusterB & Bipolar Disorders (I, II) & I\\
\clusterB & Depressive Disorders (MDD) & I\\
\clusterB & Anxiety Disorders (GAD, Phobias, Panic) & I \\
\clusterB & Obsessive-Compulsive Disorders (OCD) & I \\
\clusterB & Trauma \& Stress-Related Disorders (PTSD) & I \\
& Dissociative Disorders (DID) & I \\
& Somatic Symptom Disorders & III
\end{tabular}\hfill
% <- important to preven ending the paragraph
\begin{tabular}[b]{|c c|} \hline
\multicolumn{2}{|c|}{Clusters} \\
\hline
\clusterA & A \\
\clusterB & B \\
\clusterC & C \\
\hline
\end{tabular}
\end{frame}
\end{document}
附注:amsmath
和xcolor
由graphicx
beamer 自动加载;subfigure
已过时,请改用subfig
。