How to rotate a single character on a line?
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
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]
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
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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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.
participants (4)
-
Adam Lindsay
-
Hans Hagen
-
Peter.Andree@t-online.de
-
Stefan Wachter