我正在制作动词列表,但我无法将我制作的第一个表格与我制作的单行表格对齐。这个想法是对齐垂直线。(见下图。)
\documentclass[10pt]{article}
\usepackage[table]{xcolor}
\usepackage{tikz,efbox}
\usepackage[left=1cm,right=1cm,top=1cm,bottom=2cm]{geometry}
\efboxsetup{linecolor=black!100, linewidth=0.22pt, margin=0pt}
\usepackage{blindtext}
\usepackage[contents={},opacity=0]{background}
\definecolor{titlegrammar}{RGB}{255,128,0}
\definecolor{fucsia}{RGB}{196,0,98}
\definecolor{fucsia2}{RGB}{246,150,235}
\usepackage{XCharter}
\usepackage[T1]{fontenc}
\begin{document}
text
\clearpage
\backgroundsetup{position={0,0},opacity=0.15,placement=bottom,angle=0,scale=1,contents={\begin{tikzpicture}
\fill[fucsia] (0cm,0cm) rectangle (\paperwidth,\paperheight);
\filldraw[help lines,step=1.2mm,line width=0.8pt,white] (0cm,0cm) grid (\paperwidth,\paperheight);
\end{tikzpicture}}
}
%\BgThispage
%\arrayrulewidth=0.67pt
\efbox{\begin{tabular}{|l|l|l|}
\hline
\rowcolor{fucsia2}\textbf{Base form} & \textbf{Past simple} & \textbf{Past participle} \\
\hline
\rowcolor{white}be & was/were & been \\
\hline
\rowcolor{white}become & became & become \\
\hline
\rowcolor{white}begin & began & begun \\
\hline
\rowcolor{white}bend & bent & bent \\
\hline
\rowcolor{white}bite & bit & bitten \\
\hline
\rowcolor{white}blow & blew & blown \\
\hline
\rowcolor{white}break & broke & broken \\
\hline
\rowcolor{white}bring & brought & brought \\
\hline
\rowcolor{white}build & built & built \\
\hline
\rowcolor{white}burn & burned/burnt & burned/burnt \\
\hline
\rowcolor{white}buy & bought & bought \\
\hline
\end{tabular}}
\vspace{2ex}
\efbox{\begin{tabular}{|l|l|l|}
\rowcolor{white}learn & learned / learnt & learned / learnt
\end{tabular}}
\clearpage
\backgroundsetup{opacity=0}
text
\end{document}
我也知道表格的渲染没有正确完成,但这不是问题,因为我经常将页面转换为 JPEG 图像,这样这个问题就解决了。
答案1
类型列的宽度l
由环境中最宽的元素决定。如果两个不同环境中的tabular
两个类型列中最宽的元素宽度不等,则列宽也会不同。l
tabular
我建议你更换两个实例
\begin{tabular}{|l|l|l|}
和
\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|}
您可以猜测,列类型的参数p
决定了宽度。
答案2
对两个表都使用以下标题:
\begin{tabular}{|p{5em}|p{7em}|p{7em}|}
以下是代码的相关部分:
\efbox{\begin{tabular}{|p{5em}|p{7em}|p{7em}|}
\hline
\rowcolor{fucsia2}\textbf{Base form} & \textbf{Past simple} & \textbf{Past participle} \\
\hline
\rowcolor{white}be & was/were & been \\
\hline
\rowcolor{white}become & became & become \\
\hline
\rowcolor{white}begin & began & begun \\
\hline
\rowcolor{white}bend & bent & bent \\
\hline
\rowcolor{white}bite & bit & bitten \\
\hline
\rowcolor{white}blow & blew & blown \\
\hline
\rowcolor{white}break & broke & broken \\
\hline
\rowcolor{white}bring & brought & brought \\
\hline
\rowcolor{white}build & built & built \\
\hline
\rowcolor{white}burn & burned/burnt & burned/burnt \\
\hline
\rowcolor{white}buy & bought & bought \\
\hline
\end{tabular}}
\vspace{2ex}
\efbox{\begin{tabular}{|p{5em}|p{7em}|p{7em}|}
\rowcolor{white}learn & learned/ learnt & learned / learnt
\end{tabular}}