Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Org-mode tables: Exclude columns from export

I have a set of tables in org-mode that I am exporting, but I'd like certain columns used for calculations and consumption by code blocks to be excluded from LaTeX export.

I'm sure I saw a way to do this by specifying a range of columns to export below the table, but I can't find reference to it anywhere on the web so there's a good chance I dreamt it.

like image 627
Germano Avatar asked Jul 10 '11 13:07

Germano


2 Answers

Another way to achieve this is by defining a "hidden" column type H in the LaTeX header options of the org file and then use #+ATTR_LATEX: :align llH to indicate that the third column is to be hidden on export (source):

#+LATEX_HEADER: \usepackage{array}
#+LATEX_HEADER: \newcolumntype{H}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{}}

#+ATTR_LATEX: :align llH
|-----+-------+------|
|   2 | 1/2   | junk |
|   4 | 1/4   | junk |
|   8 | 1/2   | junk |
like image 62
ph0t0nix Avatar answered Sep 21 '22 16:09

ph0t0nix


If you are using "Radio Tables" you can do something like

#+ORGTBL: SEND some-name orgtbl-to-latex :skipcols (3)
|-----+-------+------|
|   2 | 1/2   | junk |
|   4 | 1/4   | junk |
|   8 | 1/2   | junk |

See http://www.gnu.org/software/emacs/manual/html_mono/org.html#Radio-tables for all the details.

I believe it may not be possible directly with export via C-c C-e since they offer the same answer at http://comments.gmane.org/gmane.emacs.orgmode/33946 from November 2010.

like image 28
Ivan Andrus Avatar answered Sep 21 '22 16:09

Ivan Andrus