In my org file i have the following table:

#+CAPTION: Заголовок пакета
| № | Размер | Тип      | Значение              |
|   | (байт) |          |                       |
| 1 |      1 | unsigned | *Маркер начала*       |
|   |        |          | константа 0xAC        |
| 2 |      1 | unsigned | *Размер данных*       |
|   |        |          | в байтах, от 1 до 255 |
| 3 |      1 | unsigned | *Контрольная сумма*   |
|   |        |          | по алгоритму CRC-8    |

Table was made with liberal application of org-table-wrap-region.

What i want/need: after export (to odt, doc/docx etc) have cells with multi-line contents. How do i achieve that?

Naive experimentation with built-in org export and pandoc produces tables where every line of text in original table becomes a row. What can i do to change that?

P.S. Pandoc documentation mentions multiline_tables and 'grid_tables' extensions. However, even after turning them on, i still get the same picture. Probably tables should be rewritten - but in that case, how do i reconcile output of org tables editor with the needs of pandoc input?


I couldn't find the way to do it in plain org.

So for that kind of tables I use latex tables (tabular and longtable) and export to pdf.

\caption{Перечень сокращений}
\theadfst{Сокращения} & \thead{Расшифровка} \\ \hline
АС     & Автоматизированная система\\ \hline
АРМ    & Автоматизированное рабочее место предназначенное для аудитора информационной безопасности\\ \hline
НСИ    & Нормативно-справочная информация\\ \hline
ЦХД    & Централизованное хранилище данных\\ \hline
ODS    & Оперативное хранилище данных на базе технологии Exadata и Golden Gate.\\ \hline

One of the latest msword versions which I have can open PDFs as a docx. The formatting including tables and pictures are 99% fine.


PS theadfst and thead macros I have in a latex class setup:



If you include makecell package, then your example could be made with the following latex:

\caption{Заголовок пакета}
\thead{№} & \thead{Размер \\ (байт)} & \thead{Тип} & \thead{Значение} \\ \hline
1 & 1 & unsigned & \makecell[l]{\bfseries{Маркер начала} \\ константа 0xAC}\\ \hline
2 & 1 & unsigned & \makecell[l]{\bfseries{Размер данных} \\ в байтах, от 1 до 255}\\ \hline
3 & 1 & unsigned & \makecell[l]{\bfseries{Контрольная сумма} \\ по алгоритму CRC-8}\\ \hline


  • theadfst and thead are latex macros for bold headings. – Maxim Kim Sep 6 '16 at 7:50
  • I see. This answer is formally acceptable, but writing latex tables is kind of self defeating (one can write an html table with the same success). Using org table editor is easy and pleasant, writing LaTeX or html table definitions - not so. – Srv19 Sep 7 '16 at 7:50
  • yep, org tables are good but not good enough in some environments (russian corporate docs with a lot of sofisticated tables) – Maxim Kim Sep 7 '16 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.