I am converting from another format and creating tables with varying numbers of columns. I would like the column to be approximately layed out. If there are two columns, I want each column to get half the space. Something like this:
\begin{longtable}{ p{\textwidth/2} p{\textwidth/2} }
That is, for two columns, I want to divide the textwidth by two. Documentation elsewhere suggests that division should be possible using the forward slash character.
However, what I get is that both columns are the size of the full textwidth, and each cell starts with "/2". It is as if the /2 is being interpreted as "default text" to put in every cell, even the title row cells. See below:
Very strange. Every example I can find on the web has column width done by multiplying the textwidth by a decimal number. But that is inconvenient for me: When I have three columns I want it to be divided by three, and so on. I don't have the decimal for that fraction readily available.
Any idea what to do to get division working?



\dimexpr\textwidth/2. – Phelype Oleinik Oct 31 '18 at 22:55ltablexorxltabular? – Bernard Oct 31 '18 at 23:16ltablexbrings the functionalities oflongtabletotabularx(same syntax). As to the more recentxltabularit loadsltablexbut does not redefinetabularxto avoid some of its drawbacks.. On the whole, if you know how to managelongablethere should be no difficulties in using one of those packages. – Bernard Nov 01 '18 at 18:33