[XeTeX] escaping the pipe

hh hh-brasil at bol.com.br
Wed Mar 3 02:18:32 CET 2010


There are the tex-commands "\lbrace" and "\rbrace" for problems like 
this.
hh

Date sent:      	Tue, 02 Mar 2010 19:46:30 -0500
From:           	maxwell <maxwell at umiacs.umd.edu>
To:             	Unicode-based TeX for Mac OS X and other platforms 
<xetex at tug.org>
Subject:        	[XeTeX] escaping the pipe
Send reply to:  	Unicode-based TeX for Mac OS X and other platforms 
<xetex at tug.org>
	<mailto:xetex-request at tug.org?subject=unsubscribe>
	<mailto:xetex-request at tug.org?subject=subscribe>

> This has to be simple, but nothing I've tried works, and I can't seem to
> find any ideas on-line...
> 
> I want to output something like
>    a {b|c} d
> from XeLaTeX.  I've managed to get part way there by escaping the curly
> braces in the input, but I can't figure out how to escape the pipe
> character.  That is, if I try
>    a \{a|b\} d
> (i.e. without escaping the pipe), then the pipe overwrites the 'a' to its
> left.  Or if I try
>    a \{a\|b\} d
> then XeLaTeX apparently tries to interpret the pipe character as a
> command, which of course it doesn't know how to do.  I even tried
>    a \{a\\|b\} d
> in which case the pipe looks right, but I get a newline immediately after:
>    a {b|
> c} d
> 
> I don't think it matters, but this is inside a \begin{alltt} environment.
> 
> Surely there's an easy way to do this?
> 
>    Mike Maxwell
> 
> 
> 
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex




More information about the XeTeX mailing list