我想要一个表格,左列是 tikzpictures,右列是说明性注释。我可以做些什么来改善以下示例中行内容的垂直对齐?直观地说,图片和文本都应该对齐到顶部。
\documentclass[letterpaper,10pt]{amsart}
\usepackage{tkz-euclide}
\begin{document}
\begin{tabular}{cp{6cm}}
Column title & Column title
\\
\begin{tikzpicture}[scale=0.8]
\tkzDefPoint(-7,-4){A}
\tkzDefPoint(-5, 0){B}
\tkzDefPoint(-3,-2){C}
\tkzDrawSegments(A,B B,C A,C)
\end{tikzpicture}
&
This looks really bad. What can I do to improve the alignment of the text?
\\
\begin{tikzpicture}[scale=0.8]
\tkzDefPoint(-7, 4){A}
\tkzDefPoint(-5, 0){B}
\tkzDefPoint(-3, 2){C}
\tkzDrawSegments(A,B B,C A,C)
\end{tikzpicture}
&
Flipping it vertically does not help either. How can I improve the format?
\end{tabular}
\end{document}
答案1
使用baseline=(current bounding box.north)
astikzpicture
选项应该有帮助:
\documentclass[letterpaper,10pt]{amsart}
\usepackage{tkz-euclide}
\begin{document}
\begin{tabular}{cp{6cm}}
Column title & Column title
\\
\begin{tikzpicture}[scale=0.8,baseline={([yshift=-1.8ex]current bounding box.north)}]
\tkzDefPoint(-7,-4){A}
\tkzDefPoint(-5, 0){B}
\tkzDefPoint(-3,-2){C}
\tkzDrawSegments(A,B B,C A,C)
\end{tikzpicture}
&
This looks really bad. What can I do to improve the alignment of the text?
\\
\begin{tikzpicture}[scale=0.8,baseline={([yshift=-1.8ex]current bounding box.north)}]
\tkzDefPoint(-7, 4){A}
\tkzDefPoint(-5, 0){B}
\tkzDefPoint(-3, 2){C}
\tkzDrawSegments(A,B B,C A,C)
\end{tikzpicture}
&
Flipping it vertically does not help either. How can I improve the format?
\end{tabular}
\end{document}