# Org-Mode export table to latex with word wrap

I'm trying to export a table from org-mode to latex and have dynamic line-breaks/word-wrapping, so whenever a cell exceeds a certain length, it should wrap to the next line.

This is what the latex code should look like:

\begin{tabular}{p{0.35\linewidth}|p{0.6\linewidth}}
\end{tabular}


That seems to work when I manually edit the .tex file and convert to pdf again. Here is what my org code looks like:

#+ATTR_LATEX: :environment tabular :align p{0.35\linewidth}|p{0.6\linewidth}
...


Which produces this latex output:

\begin{tabular}{|l|l|}
...


How can I set the {|l|l|} to p{0.35\linewidth}|p{0.6\linewidth} in my org file?

Edit:

My solution was actually correct, the mistake was having the table in table.el format.

• The :align spec that you have above worked for me: I get \begin{tabular}{p{0.35\linewidth}|p{0.6\linewidth}} in the LaTeX file. What version of Org mode are you running? – NickD Dec 17 '20 at 19:49
• @NickD You're correct. It does work. Turns out it doesn't when using a table.el table. Thank you for your help. – b3nj4m1n Dec 17 '20 at 20:40
• table.el tables are second-class citizens in Org mode unfortunately - there is very minimal support and AFAICT, currently the export is completely broken. – NickD Dec 17 '20 at 20:51
• I submitted a bug report to the Org mode mailing list. – NickD Dec 17 '20 at 21:13
• Nicolas Goaziou has fixed the bug that I reported: see this commit and this commit. This fixes the broken export but I don't think it does anything for your use case: table.el tables are still second-class citizens. – NickD Jan 5 at 0:16