I try to create a table with the longtable package that fits into the whole text width available. Here's my code:
\documentclass{article}
\usepackage{longtable}
\usepackage{amsmath}
\title{Raccolta delle formule}
\author{}
\date{}
\begin{document}
\maketitle
\begin{longtable}{p{.33\columnwidth} | p{.33\columnwidth} | p{.33\columnwidth} }
\Large Descrizione & \Large Formula & \Large Esempio\\
\hline
\endhead
Prodotto di due polinomi &
{
\begin{align*}
(a+b)(c+d)&=a(c+d)+b(c+d)\\
&=ac+ad+bc+bd
\end{align*}
}&
{
\begin{align*}
(2x+3)(3y-5)&=6xy-10x+9y-15
\end{align*}
}\\
\end{longtable}
\end{document}
The result is, that the table exceeds the right margin (see picture). What is wrong with the code?
Best Answer
Here is a possible solution, using the
xltabular
environment, which brings the functionalities oflongtable
totabularx
, playing with the value of the inter-column spacing, changing the alignment point: