带有逐项列出的列
我正在尝试在列表环境中设置对齐点。下面的代码给了我一个错误,但它几乎编译成我想要的,只是缺少要点。我一定是误解了有关对齐和/或表格以及它们如何与换行符一起使用的问题。指导表示赞赏!
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Title}
\begin{itemize}
\begin{tabular}{ll}
\item Topic Apple: &Something to say about it \\
\item Topic Watermelons: &Something different
\end{tabular}
\end{itemize}
\end{frame}
\end{document}
I'm trying to make alignment points in a list environment. The following code gives me an error, but it almost compiles to what I want, just missing the bullet points. I must be misunderstanding something about align and/or tabular and how they work with linebreaks. Guidance appreciated!
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Title}
\begin{itemize}
\begin{tabular}{ll}
\item Topic Apple: &Something to say about it \\
\item Topic Watermelons: &Something different
\end{tabular}
\end{itemize}
\end{frame}
\end{document}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个怎么样?
如果您将 {ll} 更改为 {p{width}l} 或 {p{width}p{width}},您的实际上会起作用,但我发现如果您在第二列中没有逐项列出,您的文本将以垂直方式结束顶部对齐,而左列中的逐项文本垂直居中(甚至可能稍微底部)对齐,因此看起来不太好。
我尝试使用 array 包和 m{width} 提供垂直居中对齐,但这仍然与 itemize 使用的任何内容不同。我想说只需使用 p{} 内部的宽度参数即可获得您想要的间距/宽度。如果您的右列溢出到另一行,您可能需要在右列中添加一个“虚拟”项目。
无论如何,基于如果事情溢出到两条线上可能需要的所有吉米装备,我假设我的解决方案可能是黑客的,但看起来它提供了您大部分想要的东西。
右列的 \item[] 用于创建相同的没有项目符号的逐项对齐。如果您想要右侧的项目符号,只需删除空方括号即可。
How about this?
Yours will actually work if you change {ll} to {p{width}l} or {p{width}p{width}} but I found that if you don't have itemize in the second column, your text ends up vertically top aligned while the itemized text in the left column is center (or maybe even slightly bottom) aligned vertically so it doesn't look good.
I tried using the array package and m{width} which provides a vertical center alignment but that was still different than whatever itemize is using. I'd say just play with the width argument inside of p{} to get the spacing/width you want. If your right column spills on to another line, you may need a "dummy" item in the right column.
Anyway, based on all the jimmy rigging that might be necessary if things spill onto two lines, I'm assuming my solution is potentially hackish but it looks like it provides what you want for the most part.
the \item[] for the right column is to create the same itemize alignment with no bullet. If you want bullets on the right, just remove the empty square brackets and you'll have them.