[dev-context] BiDi in ConTeXt

Hans Hagen pragma at wxs.nl
Thu Nov 11 17:07:31 CET 2004

Adam Lindsay wrote:

> Anyway, I cooked up a quick simulation of the Omega \pardir command as
> used in m-gamma. It only supports \pardir TRT and \pardir TLT, but is it
> a way people want to progress?

as long as we consider it a low level command ...

> \def\pardir#1#2#3{%TRT,TLT
>   \ifnum\TeXXeTstate=1\else \TeXXeTstate=1\fi % check or blindly set?
>   \doifinsetelse{#2}{R,L}
>    {\EveryPar{\setbox0=\lastbox %
>               \csname begin#2\endcsname\box0}}
>    {\message{Paragraph direction must be right or left}}
>   \doifnot{#1#3}{TT}
>    {\message{Typesetting lines from top to bottom only}}}
> Also, is dev-context the right place for a discussion like this?


i can imagine that we cook up a bit higher level interface once we know what 
we're dealing with

Anyhow, I can add this to syst-etx:

\chardef\inlinedirection\zerocount % 0==notset 1==LR 2==RL

\beginETEX \beginL

\def\pardir#1#2#3% messages end up in a higher level command

\appendtoks \checkinlinedirection \to \everypar




\input tufte

\pardir TRT \input tufte \par \input tufte

\pardir TLT \input tufte



                                           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

More information about the dev-context mailing list