9

Org tables do a great job in aligning columns with plain text.

But the alignment is lost when math formulas (in LaTeX) in cells are replaced with their preview.

Is it possible to preview LaTeX in tables with good alignment?

Notice the right-most misaligned table border

Kaushal Modi
  • 25,203
  • 3
  • 74
  • 179
  • Can you give us an example? – Tyler Dec 17 '15 at 19:43
  • off course, actually I'm trying to install a program to make screenshots on my arch... But it's smaller than other columns. – Nicolas Scotto Di Perto Dec 17 '15 at 19:50
  • @NicolasScottoDiPerto I replaced it with a cropped version for you. – Kaushal Modi Dec 17 '15 at 20:27
  • @NicolasScottoDiPerto Feel free to revert my edits if they don't look right. – Kaushal Modi Dec 17 '15 at 20:31
  • The first thing I would try is pressing `C-c C-c` in a cell in the table. This should automatically align your tables. If that doesn't work with the previews, you might try `M-x toggle-truncate-lines`. – elethan Dec 18 '15 at 04:06
  • I tried`C-c C-c` in the sell, it has untoggle all the latex previews in the file, with the LaTeX code the table is aligned, but when I toggle the preview it squeeze all my columns again. It's really a bad idea to have bind the `C-c C-c` to untoglle LaTeX preview as it's a command accessible in all the document, even if I'm in a articular org object wich has his own `C-c C-c` binding. If someone know how to fix it I'd be thankfull. Back to my question, I just noticed that I can't have more than one formulas in a row, when I toggle a formula the previous one is automatically untoggled. – Nicolas Scotto Di Perto Dec 18 '15 at 07:02
  • Related (but does not provide any answers): http://emacs.stackexchange.com/q/12782/2355 – Constantine Feb 03 '16 at 02:16

1 Answers1

1

One partial fix would be to export the only the table to latex.

highlight the table -> C-e l L to get the org-table converted into latex. Then you can preview the latex table with C-c-x l.

Of course the idea would be to do it automatically but I don't know how costly it would be.

DJJ
  • 732
  • 5
  • 19