[NTG-context] Re: How to rotate a single character on a line?
Stefan Wachter
ntg-context@ntg.nl
Thu, 01 Apr 2004 11:50:31 +0200
Hans Hagen wrote:
> At 16:22 23/03/2004, you wrote:
>
>> Hi all.
>>
>> I want to use some arrows of the ZapfDingbats fonts. Most of the
>> arrows included in this font are directed from left to right. I tried
>> to use \rotate to produce arrows directed to different directions.
>> Yet, rotate produces new lines.
>>
>> Example:
>>
>> \definefontsynonym[ZapfDingbats][zd]
>> \definefont[Zapf][ZapfDingbats at 24pt]
>>
>> \rotate[rotation=180]{\Zapf\char234} {\Zapf\char234}
>>
>> The example is intended to produce an arrow directed to the left
>> followed by an arrow directed to the right. The result however is an
>> arrow directed to the left followed by a new line with an arrow
>> directed to the right.
>>
>> intended:
>> <- ->
>>
>> result:
>> <-
>> ->
>>
>> Does someone know how the new line can be suppressed?
>
>
> (untested)
>
> \definesymbol[whatever][\dontleavehmode\rotate[rotation=180]{\getglyph{ZapfDingbats}{234}]
>
>
> \symbol[whatever]
Hi Hans,
thanks for the help. I had to enclose the symbol definition part in
curly brackets:
\definesymbol[whatever][{\dontleavehmode\rotate[rotation=180]{\getglyph{ZapfDingbats}{234}}}]
Now the symbol is rotated without causing a new line. Yet, the rotated
symbol appears below the current line:
text text -> text
<-
Is there a possibility to specifiy the center of rotation?
Thanks again,
--Stefan