[NTG-context] Ampersand in Metapost

Mojca Miklavec mojca.miklavec.lists at gmail.com
Thu May 13 23:40:44 CEST 2010


On Thu, May 13, 2010 at 22:58, Hans Hagen wrote:
> On 13-5-2010 9:18, Marco wrote:
>>
>> I have a problem producing an ampersand in metapost. In ConTeXt it works
>> as expected. Have a look at the following example.
>>
>> \starttext
>> \&  % OK
>> \startMPcode
>> label(textext("\&"),origin); % produces error
>> \stopMPcode
>> \stoptext
>>
>> The compile time error message is as follows:
>>   ! Misplaced alignment tab character&.
>>   l.1 \MPLIBsettext{1}{&
>
> \letterpercent

Or maybe \letterampersand if you want to get the desired glyph :)

Alternatively you could try to use
    label(\sometxt{\&},origin);

Mojca


More information about the ntg-context mailing list