# Org-mode: export table columns in verbatim mode

In an org-file, I have a table where I want one column to be exported verbatim:

|       Date | Rating | Comment    |
|------------+--------+------------|
| 2016-07-01 | ***    | so so      |
| 2016-07-08 | ****   | very good  |
| 2016-07-15 | *      | miserable! |


The rating column, consisting of a number (1-5) of stars, should be exported as verbatim or at least make the asterisks not be interpreted as bold. By default, the first and third line would be nearly indistinguishable in the exported pdf file (a bold asterisk versus a normal one).

Is there a way to mark the whole column so that it is exported in verbatim mode? Preferably the solution would still look good in plain text/org-mode.

## 2 Answers

Try this

In your table, use \ast, \lowast or \star from org-entities instead of an asterix *.

Note: Toggle viewing UTF-8 entities in org-mode with C-c C-x \

## \ast exports as (*)

|       Date | Rating           | Comment    |
|------------+------------------+------------|
| 2016-07-01 | \ast\ast\ast     | so so      |
| 2016-07-08 | \ast\ast\ast\ast | very good  |
| 2016-07-15 | \ast             | miserable! |
#+TBLFM: $2='(replace-regexp-in-string "\\*" "\\\\ast"$2)


## \lowast exports as (∗)

|       Date | Rating                       | Comment    |
|------------+------------------------------+------------|
| 2016-07-01 | \lowast\lowast\lowast        | so so      |
| 2016-07-08 | \lowast\lowast\lowast\lowast | very good  |
| 2016-07-15 | \lowast                      | miserable! |
#+TBLFM: $2='(replace-regexp-in-string "\\*" "\\\\lowast"$2)


## \star exports as (*)

|       Date | Rating               | Comment    |
|------------+----------------------+------------|
| 2016-07-01 | \star\star\star      | so so      |
| 2016-07-08 | \star\star\star\star | very good  |
| 2016-07-15 | \star                | miserable! |
#+TBLFM: $2='(replace-regexp-in-string "\\*" "\\\\star"$2)


## Hope that Helped!

This code was tested using
GNU Emacs 24.5.1 (x86_64-unknown-cygwin, GTK+ Version 3.14.13)
Org-mode version 8.3.5

• The replace-regexp-in-string is especially nice. I'm thinking about trying to get this into an export filter maybe. – quazgar Sep 23 '16 at 12:20

... should be exported as verbatim...

For org-tables you must /*/ format. Enter as follows:

/*/ for one star
/**/ for two stars
and so on..


Preferably the solution would still look good in plain text/org-mode.

After you tab out of the cell, the / will not display, which is clean for plain text viewing.

• This does not seam to work, it only adds italic. Could you provide a link to a documentation that states how this is expected to work? Any options that one has to apply? – theldoria Sep 15 '16 at 20:55
• It works fine for me in tables. You are probably using something non-standard. – Emacs User Sep 16 '16 at 19:04
• Not that I would know, probably it's the org version? I am using 8.3.4. – theldoria Sep 16 '16 at 21:17
• Does not work for me with a plain setup (emacs -Q), Emacs 24.5.1, org-mode 8.2.10. – quazgar Sep 23 '16 at 12:25
• I am sorry this also fails with emacs -q, which gives me 8.3.4. The slashes also have no effect in the latest version available via MELPA (8.3.5, 20160919). – quazgar Sep 23 '16 at 12:37