我使用以下几行来创建两列
\begin{columns}
\begin{column}{0.5\textwidth}
some text here some text here some text here some text here some text here
\end{column}
\begin{column}{0.5\textwidth}
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
\end{column}
\end{columns}
我想将两列的高度设置为相同的值。该怎么做?
0.5\textwidth
固定列宽。我试过了
\begin{column}{0.5\textwidth,0.2\paperheight}
。
没用。有人能帮忙吗?
答案1
1. 多色
这是一个使用的解决方案多色,因为最初我没有参考具有环境定义的包column
和columns
。
我在列内添加了一个minipage
固定高度和宽度的,并在 内添加了文本minipage
。您只需将minipage
代码复制并粘贴到“列”内,它就可以工作。%\vspace{-\topskip}
如果您希望内容与 的绝对顶部对齐,请取消注释 。如果您希望文本更接近 ,minipage
也可以更改\columnwidth
为。同样有效。0.5\textwidth
\paperheight
\documentclass{article}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\noindent\begin{minipage}[t][.2\textheight][t]{\columnwidth}
%\vspace{-\topskip}%
some text here some text here some text here some text here some text here
\end{minipage}
\columnbreak
\noindent\begin{minipage}[t][.2\textheight][t]{\columnwidth}
%\vspace{-\topskip}%
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
\end{minipage}
\end{multicols}
New text outside the columns starts here and as you see the text is below both columns.
\end{document}
2. 投影机
它也适用于投影机和columns
。我不得不将文本高度增加到 0.5,因为您的文本超过了0.2\textheight
(也超过了0.2\paperheight
):
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{minipage}[t][.5\textheight][t]{\textwidth}
some text here some text here some text here some text here some text here
\end{minipage}
\end{column}
\begin{column}{0.5\textwidth}
\begin{minipage}[t][.5\textheight][t]{\textwidth}
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
\end{minipage}
\end{column}
\end{columns}
New text outside the columns starts here and as you see the text is below both columns.
\end{frame}
\end{document}
答案2
如果列顶部对齐,它们看起来会像有相同的高度(即使实际上没有)。在列内添加额外的小页面是没有意义的,因为它们本身就是小页面。
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
some text here some text here some text here some text here some text here
\end{column}
\begin{column}{0.5\textwidth}
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
some text here some text here some text here some text here some text here
\end{column}
\end{columns}
\end{frame}
\end{document}