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.