From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Foley Subject: Re: including the | character in a table Date: Wed, 25 Jul 2018 07:43:31 -0400 Message-ID: References: <1532514079.1723507.1452263448.11595CD6@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f5aef10571d163ee" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiICp-0004pR-9r for emacs-orgmode@gnu.org; Wed, 25 Jul 2018 07:43:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiICm-0002Sz-An for emacs-orgmode@gnu.org; Wed, 25 Jul 2018 07:43:47 -0400 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:40709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiICm-0002R6-4i for emacs-orgmode@gnu.org; Wed, 25 Jul 2018 07:43:44 -0400 Received: by mail-oi0-x22e.google.com with SMTP id w126-v6so13287941oie.7 for ; Wed, 25 Jul 2018 04:43:43 -0700 (PDT) In-Reply-To: <1532514079.1723507.1452263448.11595CD6@webmail.messagingengine.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Michel Schinz Cc: emacs-orgmode@gnu.org --000000000000f5aef10571d163ee Content-Type: text/plain; charset="UTF-8" You can use \vert to insert pipes in exported tables. Kevin On Wed, Jul 25, 2018, 6:21 AM Michel Schinz wrote: > Hello, > > On Wed, Jul 25, 2018, at 11:22, Alan Schmitt wrote: > > I'm writing a cheat sheet for a programming language, and I'm having > > trouble with operators that use |. For instance: > > > > | match expr with | pattern matching | > > | | pattern -> expr | action | > > > > How can I escape the |? I tried putting a \ before but it does not work. > > I've used macros in the past for such a case. Quite heavyweight, but I > didn't find anything better. Here is an example (which you could augment if > you wanted to export to LaTeX too): > > #+MACRO: I @@html:|@@ > > | match expr with | pattern matching | > | {{{I}}}pattern -> expr | action | > > Michel. > > --000000000000f5aef10571d163ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You can use \vert to insert pipes in exported tables.

Kevin=


On W= ed, Jul 25, 2018, 6:21 AM Michel Schinz <michel@schi.nz> wrote:
He= llo,

On Wed, Jul 25, 2018, at 11:22, Alan Schmitt wrote:
> I'm writing a cheat sheet for a programming language, and I'm = having
> trouble with operators that use |. For instance:
>
> | match expr with=C2=A0 =C2=A0| pattern matching |
> | | pattern -> expr | action=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0|
>
> How can I escape the |? I tried putting a \ before but it does not wor= k.

I've used macros in the past for such a case. Quite heavyweight, but I = didn't find anything better. Here is an example (which you could augmen= t if you wanted to export to LaTeX too):

#+MACRO: I @@html:&#124;@@

| match expr with=C2=A0 =C2=A0 =C2=A0 =C2=A0 | pattern matching |
| {{{I}}}pattern -> expr | action=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0|

Michel.

--000000000000f5aef10571d163ee--