Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Escape pipe-character in org-mode

I've got a table in Emacs org-mode, and the contents are regular expressions. I can't seem to figure out how to escape a literal pipe-character (|) that's part of a regex though, so it's interpreted as a table-cell separator. Could someone point me to some help? Thanks.

Update: I'm also looking for escapes for a slash (/), so that it doesn't trigger the start of an italic/emphasis sequence. I experimented with \/ and \// - for example, suppose I want the literal text /foo/ in a table cell. Here are 3 ways of attempting it:

| /foo/ | \/foo/ | \//foo/ |

In LaTeX export, that becomes:

\emph{foo}  &  \/foo/  &  \//foo/

So none of them is the plain /foo/ I'm hoping for.

like image 791
Ken Williams Avatar asked Feb 28 '11 16:02

Ken Williams


2 Answers

\vert for the pipe.

Forward slashes seem to work fine for me unescaped when exporting both to HTML and PDF.

like image 182
Nils Fagerburg Avatar answered Nov 08 '22 08:11

Nils Fagerburg


Use a broken-bar character, “¦”, Unicode 00A6 BROKEN BAR. This may or may not work for your specific needs, but it’s a good visual approximation.

like image 43
Sue D. Nymme Avatar answered Nov 08 '22 09:11

Sue D. Nymme