I'm using tabularray
to create a table with various colspans and rowspans. The table has width = \linewidth
and colspec = {|X[1]|X[1]|X[2]|}
, but it exceeds the linewidth, and the column width X
requests are not obeyed:
How can I get the table to stick to the linewidth, and to respect the column widths I've given?
Minimum working example:
\documentclass{article}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{makecell}
\usepackage{tabularray}
\usepackage{pgffor, etoolbox}
% headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear existing header/footer entries
\fancyhead[C]{\footnotesize test}
\begin{document}
\noindent
\begin{tblr}{
width = \linewidth,
colspec = {|X[1]|X[1]|X[2]|}
}
%\begin{tblr}{|p{0.2\linewidth}|p{0.2\linewidth}|p{0.4\linewidth}|}
\hline
\SetCell[c=3]{c} \textbf{DOCUMENTATION INFORMATION PAGE} & &
\\
\hline
\textbf{1. DATE} \newline date & \textbf{2. DOCUMENT TYPE} \newline document type & \textbf{3. DOCUMENT NUMBER / REV} \newline document number \space document version
\\
\hline
\SetCell[c=2]{l} \textbf{4. Title \newline title } & & \textbf{5. PROJECT CODE} \newline project code
\\
\hline
\SetCell[c=2]{l} \textbf{6. AUTHOR} \newline author & & \textbf{7. CUSTOMER} \newline customer
\\
\hline
\SetCell[c=2,r=2]{l} {
\textbf{8. CONTACT ADDRESS} \\
Lorem \\
Ipsum \\
Dolor \\
Sit \\
Amet
}
&
&
\textbf{9. CONTACT PHONE} \newline telephone number \vspace{0.4em}
\\
\hline
&
&
\textbf{10. CONTACT EMAIL} \newline author email
\\
\hline
\SetCell[c=2]{l} \textbf{11. TELEPHONE NUMBER} \newline telephone number
&
&
\textbf{12. NAME OF RESPONSIBLE PERSON} \newline author
\\
\hline
\end{tblr}
\end{document}