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
Mojca Miklavec wrote:
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 -----------------------------------------------------------------
Hans Hagen wrote:
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
Mojca Miklavec wrote:
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 -----------------------------------------------------------------
Mojca Miklavec wrote:
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Mojca Miklavec