我在 tikzposter 块中有一个包含文字和图片的表格。
\documentclass[20pt, a0paper, landscape]{tikzposter}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usetheme{Simple}
\begin{document}
\begin{columns}
\begin{columns}
\column{0.5}
\block{Geographical Area}{
\begin{tabular}[t]{p{0.5\linewidth} p{0.5\linewidth}}
hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world!
&
\includegraphics[width=\linewidth,]{PIC.pdf}
\end{tabular}
}
\end{columns}
\end{document}
我正在尝试将文本对齐到左侧单元格的顶部,以便它看起来像这样:
谢谢!
答案1
您可以使用valign=t
选项(需要adjustbox
带有export
选项的包)来使表格中的文本和图像顶部对齐。在下面的示例中,我还调整了两个表格列的宽度,以消除框过满警告。
\documentclass[20pt, a0paper, landscape]{tikzposter}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usetheme{Simple}
\begin{document}
\begin{columns}
\column{0.5}
\block{Geographical Area}{
\begin{tabular}[t]{*{2}{p{\dimexpr 0.5\linewidth-2\tabcolsep}}}
hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world! hello world!
&
\includegraphics[width=\linewidth,valign=t]{example-image}
\end{tabular}
}
\end{columns}
\end{document}