ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to rotate a single character on a line?
@ 2004-03-23 15:22 Stefan Wachter
  2004-03-24  9:19 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wachter @ 2004-03-23 15:22 UTC (permalink / raw)


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?

Thanks,
--Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to rotate a single character on a line?
  2004-03-23 15:22 How to rotate a single character on a line? Stefan Wachter
@ 2004-03-24  9:19 ` Hans Hagen
  2004-04-01  9:50   ` Stefan Wachter
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2004-03-24  9:19 UTC (permalink / raw)


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]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to rotate a single character on a line?
  2004-03-24  9:19 ` Hans Hagen
@ 2004-04-01  9:50   ` Stefan Wachter
  2004-04-02 12:53     ` Adam Lindsay
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wachter @ 2004-04-01  9:50 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: How to rotate a single character on a line?
  2004-04-01  9:50   ` Stefan Wachter
@ 2004-04-02 12:53     ` Adam Lindsay
  2004-04-02 13:51       ` Hans Hagen
  2004-04-07  6:29       ` after updating I failed using MPtoPDF Peter.Andree
  0 siblings, 2 replies; 7+ messages in thread
From: Adam Lindsay @ 2004-04-02 12:53 UTC (permalink / raw)


Hello again, Stefan.

I'm not exactly sure why I'm doing this, but I'm learning a lot in the
process...

Stefan Wachter said this at Thu, 1 Apr 2004 11:50:31 +0200:

>>
>> \definesymbol[whatever][\dontleaveh
>mode\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][{\dontleavehm
>ode\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?

I'm not sure about that, but a bit of trial-and-error gives (building
upon yesterday's posts and my little symb-uzd package):

\usesymbols[uzd]
\setupsymbolset[Unicode Shadowed Arrows]
\definesymbol[left][{%
           \raisebox{0.05em}\normalhbox{\rotate[location={high},rotation=180]
              {\symbol[LeftShadedWhiteRightwardsArrow]}}}]
\definesymbol[right][{\symbol[RightShadedWhiteRightwardsArrow]}]
\starttext
test \symbol[left] \symbol[right] test \crlf

\tfb
test \symbol[left] \symbol[right] test \crlf

\tfd
test \symbol[left] \symbol[right] test \crlf

\stoptext

You can replace the symbol names with your \getglyph{ZapfDingbats}{234}, etc.

From testing (Apple's PDF vs Adobe Viewer), it looks like precise
placement will be difficult, given your other concerns: different viewers
are going to have differently-drawn Dingbat fonts, and alignment, here,
is going to depend a fair bit on the internal structure of these fonts.

(Heh, I just thought of this:)

\definesymbol[left][{%
           \mirror{\symbol[LeftShadedWhiteRightwardsArrow]}}]

The mirrored version works fine, and is what you probably want. That's
ConTeXt for you... sometimes you have to take a step back and realise
that it can be done more simply!

adam
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay                      atl@comp.lancs.ac.uk
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK             Fax:+44(0)1524/593.608
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: How to rotate a single character on a line?
  2004-04-02 12:53     ` Adam Lindsay
@ 2004-04-02 13:51       ` Hans Hagen
  2004-04-02 15:10         ` Adam Lindsay
  2004-04-07  6:29       ` after updating I failed using MPtoPDF Peter.Andree
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2004-04-02 13:51 UTC (permalink / raw)


At 14:53 02/04/2004, you wrote:

>(Heh, I just thought of this:)
>
>\definesymbol[left][{%
>            \mirror{\symbol[LeftShadedWhiteRightwardsArrow]}}]
>
>The mirrored version works fine, and is what you probably want. That's
>ConTeXt for you... sometimes you have to take a step back and realise
>that it can be done more simply!

clever, i hadn't thought of that -)

Hans  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: How to rotate a single character on a line?
  2004-04-02 13:51       ` Hans Hagen
@ 2004-04-02 15:10         ` Adam Lindsay
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Lindsay @ 2004-04-02 15:10 UTC (permalink / raw)


Hans Hagen said this at Fri, 2 Apr 2004 15:51:39 +0200:

>>The mirrored version works fine, and is what you probably want. That's
>>ConTeXt for you... sometimes you have to take a step back and realise
>>that it can be done more simply!
>
>clever, i hadn't thought of that -)

Well, it works well with those particular glyphs, but you need both
\rotate and \mirror for other Dingbats.

Unfortunately, some are drawn so that you can't really get good opposing
pairs out of them (e.g. FrontTiltedShadowedWhiteRightwardsArrow, which is
simply a vertical mirror image BackTiltedShadowedWhiteRightwardsArrow).
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay                      atl@comp.lancs.ac.uk
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK             Fax:+44(0)1524/593.608
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 7+ messages in thread

* after updating I failed using MPtoPDF
  2004-04-02 12:53     ` Adam Lindsay
  2004-04-02 13:51       ` Hans Hagen
@ 2004-04-07  6:29       ` Peter.Andree
  1 sibling, 0 replies; 7+ messages in thread
From: Peter.Andree @ 2004-04-07  6:29 UTC (permalink / raw)


Hi to all,

I suppose it's a ConTeXt-problem, but I'm not sure. After updating or installing a new 
MikTeX, no problems occurs with LaTeX or PdfLaTeX.

I'm producing all my graphic-files with MetaPost, using a batchfile with the following 
simple content:
texexec --mptex %1

(in the mp-file usually I use \input mp-tool and \input meta-fun)
The resulting files, filename.1, filename.2,...,included with the graphicx-usepackage, are 
ok, processing them with LaTeX.

Now follows the file-processing with an other batchfile with MPtoPDF:
perl \texmf\scripts\context\perl\mptopdf.pl %1.* 

(the path in MikTeX-installation changed)

The resulting files filename-1.pdf, filename-2.pdf,..., doesn't contain anything, no picture, 
no fonts, but have a filesize. Looking this files with Acrobat Reader I see an empty frame. 
Looking for fonts, I get the list with used fonts, but nothing is to see in this nice picture. 
The log-file doesn't complain.

Thanks for gicing me an advice, Peter.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-04-07  6:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-23 15:22 How to rotate a single character on a line? Stefan Wachter
2004-03-24  9:19 ` Hans Hagen
2004-04-01  9:50   ` Stefan Wachter
2004-04-02 12:53     ` Adam Lindsay
2004-04-02 13:51       ` Hans Hagen
2004-04-02 15:10         ` Adam Lindsay
2004-04-07  6:29       ` after updating I failed using MPtoPDF Peter.Andree

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 NNTP newsgroup(s).