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

* Re: rotated accented character
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Mojca Miklavec @ 2005-08-22  0:25 UTC (permalink / raw)


Hans Hagen wrote:
>
> Hm, probably needed for old-slovenian or so:

To typeset the old-slovenian I have to wait for another couple of
years for some more glyphs which cannot be faked ;)
(But you know - our phoneticians never run out of ideas how to write
what we speak. These strange glyps are a part of modern dictionaries
and grammars.)

I'm glad that I can finally type one of the characters that I was
searching for years in LaTeX :) ... Also thanks to Brooks for
inspiring me with his nice question marks in the garden.

> \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}}

Thank you, Hans! This macro solved two problems at once :)
Now I can also define \udoublegrave (the "Aditions for Slovenian and
Croatian" section of Unicode ;) by simply putting
\mirror{\texthungarumlaut} as an argument to \topaccent.

Definitions of those strange glyphs have nothing to do in the ConTeXt
core, but perhaps you can put the \topaccent there as someone else
could need it as well.

Thanks again,
     Mojca

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

* Re: rotated accented character
  2005-08-22  0:25 ` Mojca Miklavec
@ 2005-08-22 16:08   ` Hans Hagen Outside
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen Outside @ 2005-08-22 16:08 UTC (permalink / raw)


Mojca Miklavec wrote:

>
>Thank you, Hans! This macro solved two problems at once :)
>Now I can also define \udoublegrave (the "Aditions for Slovenian and
>Croatian" section of Unicode ;) by simply putting
>\mirror{\texthungarumlaut} as an argument to \topaccent.
>
>  
>
hm, your little private tex version ...

>Definitions of those strange glyphs have nothing to do in the ConTeXt
>core, but perhaps you can put the \topaccent there as someone else
>could need it as well.
>  
>
ok, done

Hans  

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

* Re: rotated accented character
  2005-08-21 13:34   ` Mojca Miklavec
  2005-08-21 18:31     ` Hans Hagen
@ 2005-08-21 18:33     ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2005-08-21 18:33 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
-----------------------------------------------------------------

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

* Re: rotated accented character
  2005-08-21 13:34   ` Mojca Miklavec
@ 2005-08-21 18:31     ` Hans Hagen
  2005-08-21 18:33     ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2005-08-21 18:31 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
-----------------------------------------------------------------

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

* Re: rotated accented character
  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
  0 siblings, 2 replies; 8+ messages in thread
From: Mojca Miklavec @ 2005-08-21 13:34 UTC (permalink / raw)


Hans Hagen wrote:
> Mojca Miklavec wrote:
> 
> > 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
> 
> there are many ways to rotate ...

Thank you, Hans. It was actually \hbox in the examples which solved
the first part of my problem. I already tried different location=*
out, but I was confused by the fact that some of them behaved pretty
strange without \hbox. An example:

% location = depth, fit, broad, normal, high
a\rotate[rotation=180,location=broad]{e}i\par
a\rotate[rotation=180,location=broad]{\hbox{e}}i

(I can well imagine that this is the intended behaviour when mixing
writing directions. I was just a bit confused and thought that I was
missing some other parameter which wouldn't need an additional hbox.)


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

Thank you,
    Mojca

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

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


Mojca Miklavec wrote:

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


there are many ways to rotate ...

% \dostepwiserecurse{0}{360}{10}
%   {\startlinecorrection[blank]
%    \hbox
%      {\expanded{\setuprotate[rotation=\recurselevel]}%
%       \traceboxplacementtrue
%       \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=depth] 
{\ruledhbox{\bfb  (depth)}}}}%
%       \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=fit]   
{\ruledhbox{\bfb    (fit)}}}}%
%       \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=broad] 
{\ruledhbox{\bfb  (broad)}}}}%
%       \hbox to 
.2\hsize{\hss\ruledhbox{\rotate[location=normal]{\ruledhbox{\bfb 
(normal)}}}}%
%       \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high]  
{\ruledhbox{\bfb   (high)}}}}}
%    \stoplinecorrection}

 

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