ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: rotated accented character
@ 2005-08-21 18:32 Hans Hagen
  2005-08-22  0:25 ` Mojca Miklavec
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2005-08-21 18:32 UTC (permalink / raw)


Mojca Miklavec wrote:

>So now that I have the properly rotated letter, is it possible to do
>the following:
>
>% U0259 LATIN SMALL LETTER SCHWA
>\definecharacter schwa {\rotate[rotation=180,location=high]{\hbox{e}}}
>\definecharacter schwagrave {\buildtextaccent\textgrave{\schwa}}
>\schwagrave
>  
>

Hm, probably needed for old-slovenian or so:

\starttext

\unexpanded\def\topaccent#1#2#3#4#5% down right slantcorrection accent char
  {\dontleavehmode
   \bgroup
     \setbox0\hbox{#4}%
     \setbox2\hbox{#5}%
     \hbox to \wd2 \bgroup
        \hss\copy2\hss
        \hskip-\wd2
        \hss\hskip#2\wd0\hskip-#3\fontdimen1\font\raise#1\hbox{#4}\hss
     \egroup
   \egroup}

\def\buildtextgrave{\topaccent{0pt}{0}{15}{\textgrave}}

\startencoding[default]

\definecharacter schwa      {\hbox{\rotate[rotation=180,location=high]{\hbox{e}}}}
\definecharacter schwagrave {\buildtextgrave\schwa}

\stopencoding

test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave

\sl test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave

\stoptext

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread
* rotated accented character
@ 2005-08-18 13:49 Mojca Miklavec
  2005-08-18 18:14 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Mojca Miklavec @ 2005-08-18 13:49 UTC (permalink / raw)



Hello,

I would like to define an accented rotated character e,
"schwagrave". The following definition fails because of two reasons:
- rotate rotates around the middle of the baseline (I would like to
place the rotated e at the same place where it was before)
- buildtextaccent doesn't like the box produced by rotation


%----------------------------------------------------------%

% U0254 LATIN SMALL LETTER OPEN O
\definecharacter openo {\rotate[rotation=180]{c}}

% U0259 LATIN SMALL LETTER SCHWA
\definecharacter schwa {\rotate[rotation=180]{e}}

\definecharacter schwagrave
{\buildtextaccent\textgrave{\schwa}}

1\openo 2\schwagrave 3

%----------------------------------------------------------%

In the second example I would like to rotate the accent to produce some
other glyphs used in our phonetics:

%----------------------------------------------------------%

\definecharacter textinvertedbreve {\rotate[rotation=180]{\textbreve}}
\def\buildtextbottominvertedbreve
{\bottomaccent{.25ex}{0}{5}{\textinvertedbreve}}

% U0217 LATIN SMALL LETTER U WITH INVERTED BREVE
\definecharacter uinvertedbreve {\buildtextaccent\textinvertedbreve u}
% U0216 LATIN CAPITAL LETTER U WITH INVERTED BREVE
\definecharacter Uinvertedbreve {\buildtextaccent\textinvertedbreve U}
% spoken u, not in Unicode
\definecharacter uinvertedbrevebelow {\buildtextbottominvertedbreve u}

1\uinvertedbrevebelow 2\uinvertedbreve 3\Uinvertedbreve 4
\it 1\uinvertedbrevebelow 2\uinvertedbreve 3\Uinvertedbreve 4

%----------------------------------------------------------%


Any suggestions?

Thank you,
	Mojca

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

end of thread, other threads:[~2005-08-22 16:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-21 18:32 rotated accented character Hans Hagen
2005-08-22  0:25 ` Mojca Miklavec
2005-08-22 16:08   ` Hans Hagen Outside
  -- strict thread matches above, loose matches on Subject: below --
2005-08-18 13:49 Mojca Miklavec
2005-08-18 18:14 ` Hans Hagen
2005-08-21 13:34   ` Mojca Miklavec
2005-08-21 18:31     ` Hans Hagen
2005-08-21 18:33     ` Hans Hagen

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).