Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

exporting vertical lines in org mode table to LaTeX

I'm using emacs as my editor and I am toying with org-mode which looks rather useful.

I'm generating a table (spreadsheet) in org mode and it is exported correctly to LaTeX apart from the vertical lines. Is there a way to export them? I want to have a way to define some of the vertical lines as visible.

like image 304
Yotam Avatar asked Dec 16 '11 10:12

Yotam


People also ask

How do I draw a vertical line in a table in latex?

The \vline command will draw a vertical line extending the full height and depth of its row. An \hfill command can be used to move the line to the edge of the column. It can also be used in an @-expression.

How do you make a table in Org mode?

The easiest way to create a table is to directly type the "|" character at the beginning of a line, or after any amount of white space. This will put you in the first field of an atomic table. Once you've finished editing this cell, you can jump to the next one by pressing TAB .


2 Answers

You can give the format to the table for LaTeX with #+attr_latex:, say:

#+attr_latex: align=|c|c|c|
|------+-----+-----|
|    A |   B |   C |
|------+-----+-----|
| 2.34 | 2.7 | 8.9 |
| 3.67 | 4.5 | 8.9 |
|------+-----+-----|
like image 186
rvf0068 Avatar answered Sep 24 '22 15:09

rvf0068


You should use Column Groups

can use a special row where the first field contains only ‘/’. The further fields can either contain ‘<’ to indicate that this column should start a group, ‘>’ to indicate the end of a column, or ‘<>’ to make a column a group of its own. Boundaries between column groups will upon export be marked with vertical lines.

This has the advantage of working in HTML export as well as LaTeX export.

like image 31
SkydiveMike Avatar answered Sep 23 '22 15:09

SkydiveMike