我希望这是一个最小示例,我不知道如何在不删除我需要帮助的内容的情况下将其缩小...无论如何,总共有 4 个框或“项目”,它们都必须显示在一张投影仪幻灯片上。它们之前都显示在横向上,但那是在我将其放入投影仪之前,现在它们无法全部适合页面(我还使用 16:9 的比例使其更宽)。我尝试将框缩小,但当我这样做时,框之间没有空间,它们重叠了。基本上,我只需要 4 个框均匀地分布在屏幕上,而不是重叠/超出屏幕。抱歉,我对此还很陌生...任何帮助都将不胜感激。
\documentclass[aspectratio=169]{beamer}
\mode<presentation>{}
\usepackage{ocgx}
\usepackage{tikz}
\usepackage{array}
\addtolength{\oddsidemargin}{-2.90in}
\addtolength{\evensidemargin}{-2.90in}
\addtolength{\textwidth}{4in}
\newcommand{\myarrow}{\raisebox{1ex}{\tikz \draw[->, line width=1.25mm] (0,0)--++(1,0);}}
\begin{document}
\begin{frame}
%\small
\begin{minipage}[t]{5cm}
\switchocg{ocg1}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 1} \\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 1}{ocg1}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{green}{
\begin{tabular}{m{4.18cm}}
Item 1
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 3
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 4
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 5
\end{tabular}
}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 6
\end{tabular}
}%
}%
}
\end{ocg}
\end{minipage}%
\indent \myarrow
\indent \begin{minipage}[t]{5cm}
\switchocg{ocg2}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 2} \\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 2}{ocg2}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 1
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}%
}%
}
\end{ocg}
\end{minipage}%
\indent \myarrow
\indent \begin{minipage}[t]{5cm}
\switchocg{ocg3}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 3}\\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 3}{ocg3}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 1
\end{tabular}
}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 3
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 4
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 5
\end{tabular}
}}%
}%
}
\end{ocg}
\end{minipage}%
\indent \myarrow
\indent \begin{minipage}[t]{5cm}
\switchocg{ocg4}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 4}\\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 4}{ocg4}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{red}{\normalsize \color{white}
\begin{tabular}{m{4.3cm}}
Item 1
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}
\begin{tabular}{m{4.3cm}}
Item 3
\end{tabular}
}}%
}%
\end{ocg}
\end{minipage}%
\end{frame}
%
\end{document}
答案1
如果您删除了边距的修改,则可以通过在\resizebox{\textwidth}{!}{...}
内容周围添加 来让图表舒适地适应页面。或者,您可以使用收缩选项,例如\begin{frame}[shrink=40]
或任何适合您需要的值。
\documentclass[aspectratio=169]{beamer}
\mode<presentation>{}
\usepackage{ocgx}
\usepackage{tikz}
\usepackage{array}
\newcommand{\myarrow}{\raisebox{1ex}{\tikz \draw[->, line width=1.25mm] (0,0)--++(1,0);}}
\begin{document}
\begin{frame}
%\small
\resizebox{\textwidth}{!}{%
\begin{minipage}[t]{5cm}
\switchocg{ocg1}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 1} \\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 1}{ocg1}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{green}{
\begin{tabular}{m{4.18cm}}
Item 1
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 3
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 4
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 5
\end{tabular}
}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 6
\end{tabular}
}%
}%
}
\end{ocg}
\end{minipage}%
\indent \myarrow
\indent \begin{minipage}[t]{5cm}
\switchocg{ocg2}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 2} \\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 2}{ocg2}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 1
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}%
}%
}
\end{ocg}
\end{minipage}%
\indent \myarrow
\indent \begin{minipage}[t]{5cm}
\switchocg{ocg3}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 3}\\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 3}{ocg3}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 1
\end{tabular}
}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 3
\end{tabular}
}}\\%
\colorbox{green}{\normalsize
\begin{tabular}{m{4.3cm}}
Item 4
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}{
\begin{tabular}{m{4.3cm}}
Item 5
\end{tabular}
}}%
}%
}
\end{ocg}
\end{minipage}%
\indent \myarrow
\indent \begin{minipage}[t]{5cm}
\switchocg{ocg4}{%
\fcolorbox{black}{white}{%
\bfseries\Large%
\resizebox{5cm}{!}{\begin{tabular}{c c c c c c c c c c c c c c}
\\
\\
{\Huge Project 4}\\
\\
\\
\end{tabular}}}}\\%
\begin{ocg}{OCG 4}{ocg4}{0}
\colorbox{white}{%
\parbox{10cm}{%
\colorbox{red}{\normalsize \color{white}
\begin{tabular}{m{4.3cm}}
Item 1
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}
\begin{tabular}{m{4.3cm}}
Item 2
\end{tabular}
}\\%
\colorbox{red}{\normalsize \color{white}
\begin{tabular}{m{4.3cm}}
Item 3
\end{tabular}
}}%
}%
\end{ocg}
\end{minipage}%
}
\end{frame}
%
\end{document}