emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michel Schinz <michel@schi.nz>
To: emacs-orgmode@gnu.org
Subject: Re: including the | character in a table
Date: Wed, 25 Jul 2018 12:21:19 +0200	[thread overview]
Message-ID: <1532514079.1723507.1452263448.11595CD6@webmail.messagingengine.com> (raw)
In-Reply-To: <m2a7qfwtyz.fsf@charm.irisa.fr>

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:&#124;@@

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

Michel.

  reply	other threads:[~2018-07-25 10:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  9:22 including the | character in a table Alan Schmitt
2018-07-25 10:21 ` Michel Schinz [this message]
2018-07-25 11:43   ` Kevin Foley
2018-07-25 12:16     ` Alan Schmitt
2018-07-25 12:19       ` Kevin Foley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1532514079.1723507.1452263448.11595CD6@webmail.messagingengine.com \
    --to=michel@schi.nz \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).