[Tex/LaTex] How to establish the width of a column in a longtable

longtabletableswidth

I wrote a table by longtable. It works correctly but I would like to improve the layout of the width a column.
In the figure below you can see the result:enter image description here

As you can see, the last colums is very close to the page header, so I want to reduce the width of the column B (it has too much space that it does not need).

I tried to modify the width of columns B and C (column C is too far from column B) but the result does not change.

Can you help me?
I post also my code:

\landscape
\begin{longtable}{p{2.5cm}p{0.5cm}p{2cm}p{4cm}p{3.5cm}p{2.5cm}p{1.5cm}}

\caption{Table name.......................}
\label{tab:Summary} \\

\toprule
\textbf{AAAAAA} &\textbf{BBBBB} &\textbf{CCCCC} &\textbf{DDDDD DDDDDD} &    \textbf{EEEE EEEEEEE} & \textbf{IFFFF ffff} &\textbf{EEEEEEEEE}\\

\midrule
\endfirsthead
% intestazione normale
\multicolumn{2}{l}{\footnotesize\itshape\tablename~\thetable:
continued from previous page} \\
\toprule
\textbf{AAAAAA} &\textbf{BBBBB} &\textbf{CCCCC} &\textbf{DDDDD DDDDDD} &    \textbf{EEEE EEEEEEE} & \textbf{IFFFF ffff} &\textbf{EEEEEEEEE}\\
\midrule
\endhead

\midrule
\multicolumn{2}{r}{\footnotesize\itshape\tablename~\thetable:
Continued on next page} \\
\endfoot
% piede finale
\bottomrule
\multicolumn{2}{r}{\footnotesize\itshape\tablename~\thetable:
It ends from the previous page.} \\
\endlastfoot
% corpo della tabella
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline



\end{longtable}
\endlandscape

Can you help me?
Thanks in advance

Best Answer

for single-line entries it's more natural to use l and let the table find the natural width of the content, also you need to allow the note in the foot to span more columns. Also landscape is an environment.

enter image description here

\documentclass{article}

\usepackage{longtable,pdflscape,booktabs}

\begin{document}
\begin{landscape}
\begin{longtable}{lllp{2cm}p{4cm}lp{3.5cm}}

\caption{Table name.......................}
\label{tab:Summary} \\

\toprule
\textbf{AAAAAA} &\textbf{BBBBB} &\textbf{CCCCC} &\textbf{DDDDD DDDDDD} &    \textbf{EEEE EEEEEEE} & \textbf{IFFFF ffff} &\textbf{EEEEEEEEE}\\

\midrule
\endfirsthead
% intestazione normale
\multicolumn{7}{l}{\footnotesize\itshape\tablename~\thetable:
continued from previous page} \\
\toprule
\textbf{AAAAAA} &\textbf{BBBBB} &\textbf{CCCCC} &\textbf{DDDDD DDDDDD} &    \textbf{EEEE EEEEEEE} & \textbf{IFFFF ffff} &\textbf{EEEEEEEEE}\\
\midrule
\endhead

\midrule
\multicolumn{7}{r}{\footnotesize\itshape\tablename~\thetable:
Continued on next page} \\
\endfoot
% piede finale
\bottomrule
\multicolumn{7}{r}{\footnotesize\itshape\tablename~\thetable:
It ends from the previous page.} \\
\endlastfoot
% corpo della tabella
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline
AAAAAA al. & AAAAAA & BBBBBBB & description description description description & description description description description description & bbbbbbb & aaaaaa and bbbbb\\

\hline



\end{longtable}
\end{landscape}
\end{document}