I need to create a longtable with fixed average width that contains one adaptive column and two others with derived widths to fit the average table width.
I tried this answer but I need a parbox in last column.
\documentclass{article}
\usepackage{longtable}
\begin{document}
Perfect Fit
\begin{longtable}[l]{|p{0.35\textwidth}|p{0.05\textwidth}|p{0.6\textwidth}|}%
HTML & - & HyperText Markup Language \\
PHP & - & Hypertext Preprocessor \\
Oceanogr. Oceanogr. .& - & oceanography, oceanographic(al) oceanography, oceanographic(al) oceanography, oceanographic(al)
\end{longtable}
Manual Adjustment 1
\begin{longtable}[l]{|l|p{0.05\textwidth}|p{0.26\textwidth}|}%
HTML & - & HyperText Markup Language \\
PHP & - & Hypertext Preprocessor \\
Oceanogr. Oceanogr. Oceanogr. Oceanogr. Oceanogr.& - & oceanography, oceanographic(al) oceanography, oceanographic(al) oceanography, oceanographic(al)
\end{longtable}
Manual Adjustment 2
\begin{longtable}[l]{|l|p{0.05\textwidth}|p{0.54\textwidth}|}%
HTML & - & HyperText Markup Language \\
PHP & - & Hypertext Preprocessor \\
Oceanogr. Oceanogr. Oceanogr. & - & oceanography, oceanographic(al) oceanography, oceanographic(al) oceanography, oceanographic(al)
\end{longtable}
\end{document}
Can I just get the resulted first column width someway and substract it from textwidth to set widths for other columns?
xltabularpackage. It combines the features oflongtable(mid-table pabe breaks) withtabularx(flexible widthXtype columns). – leandriis Apr 08 '20 at 08:29ptype columns in your first table add up to1\textwidth, the table is still too wide. To make it exactly as wide as the textwidth, you would have to take the value of\tsbcolsep(2 per column) and the width of the vertical lines (`\arrayrulewidth) into account. – leandriis Apr 08 '20 at 08:32