Hi folks. I just started thinking about further language support within ConTeXt now that the XeTeX-ConTeXt "basics" are done. XeTeX doesn't have the same character/line directionality control that is apparently in Omega, but it does control Right/Left typesetting fairly well. In particular, it makes a fairly big deal of its implementation of the eTeX beginR/beginL extensions. They seem to work fairly well in demos I've seen and simplistic tests I've done. I was wondering about the bigger issues in terms of BiDi support, though. Do people want an interface that mimics Omega's \pardir command? Or is there a more simple/focussed/specific way? (I imagine I don't see a single \beginR in ConTeXt's source code because it relies heavily on proper font support, probably beyond what the TFM system usually offers.) 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? \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? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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?
sure 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 {\global\TeXXeTstate\plusone \if#2L\chardef\inlinedirection\plusone\else \if#2R\chardef\inlinedirection\plustwo\fi\fi} \appendtoks \checkinlinedirection \to \everypar \def\checkinlinedirection {\ifcase\inlinedirection\or\beginL\or\beginR\fi} \endETEX \starttext \input tufte \pardir TRT \input tufte \par \input tufte \pardir TLT \input tufte \stoptext 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 -----------------------------------------------------------------
Hans Hagen said this at Thu, 11 Nov 2004 17:07:31 +0100:
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 ...
Also, is dev-context the right place for a discussion like this?
sure
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:
Thus ends the tutorial at the feet of the master. Yeah, that works fine with XeTeX as well, but know that XeTeX's behaviour isn't exactly the same as eTeX... [see attached] This is because XeTeX also respects the inherent direction of the script (from Unicode/the font itself), so insertion of a word of arabic, for example, is correctly set right-to-left, even in a paragraph of LtoR roman. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Lindsay wrote:
Hans Hagen said this at Thu, 11 Nov 2004 17:07:31 +0100:
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 ...
Also, is dev-context the right place for a discussion like this?
sure
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:
Thus ends the tutorial at the feet of the master.
Yeah, that works fine with XeTeX as well, but know that XeTeX's behaviour isn't exactly the same as eTeX... [see attached]
This is because XeTeX also respects the inherent direction of the script (from Unicode/the font itself), so insertion of a word of arabic, for example, is correctly set right-to-left, even in a paragraph of LtoR roman.
ha, funny side effect, somehow i think that this kind of automatisms are dangerous (same for language) so, maybe we're talking about \worddir as well i think that it makes sense to have an xtex switch for disabling this automatism: three states: font, font+tex, tex (what happen swith arabic in rl mode? does it get reversed due to the font?) another interesting feature can be a kind of hook into this language mechanism, like \XeTeXbeginlanguage{en}{tokens} \XeTeXendlanguage{en}{tokens} and that these are expanded automatically when a language switches. btw, i didn't test that yet, but xetex could be a nice fo engine [i'm currently working on foxet] 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 -----------------------------------------------------------------
Hans Hagen said this at Thu, 11 Nov 2004 18:06:19 +0100:
ha, funny side effect, somehow i think that this kind of automatisms are dangerous (same for language)
I don't know, actually.
so, maybe we're talking about \worddir as well
i think that it makes sense to have an xtex switch for disabling this automatism: three states: font, font+tex, tex
Shall I propose that to Jonathan, or you?
(what happen swith arabic in rl mode? does it get reversed due to the font?)
Arabic is very happy in RL mode, it's its natural state.
another interesting feature can be a kind of hook into this language mechanism, like
\XeTeXbeginlanguage{en}{tokens} \XeTeXendlanguage{en}{tokens}
and that these are expanded automatically when a language switches.
I saw that sort of thing in m-gamma. It sounds sensible.
btw, i didn't test that yet, but xetex could be a nice fo engine [i'm currently working on foxet]
I'm thinking so, as well. Haven't tested it with those modules yet, but it tears through cont-ml code with aplomb. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Lindsay wrote:
Shall I propose that to Jonathan, or you?
you, since you're the context mac guru, you can cc me -) 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 -----------------------------------------------------------------
[Please forward to dev-context@ntg.nl]
On Thu, 11 Nov 2004 14:53:25 +0000, Adam Lindsay
Hi folks.
Hi Adam, & thnx for cc'ing me.
I just started thinking about further language support within ConTeXt now that the XeTeX-ConTeXt "basics" are done. XeTeX doesn't have the same character/line directionality control that is apparently in Omega, but it does control Right/Left typesetting fairly well.
I've been out of the loop on all things TeX for a while now (demands of my profession and other matters). I have a couple of general questions: 1. What exactly is the aim and purpose of XeTeX? 2. Since its apparently based on eTeX, and since bidi seems to be of interest, why not integrate it with the Aleph project, also eTeX-based (with an eye towards ConTeXt), and which already has the bidi stuff implemented rather well?
In particular, it makes a fairly big deal of its implementation of the eTeX beginR/beginL extensions. They seem to work fairly well in demos I've seen and simplistic tests I've done.
I was wondering about the bigger issues in terms of BiDi support, though. Do people want an interface that mimics Omega's \pardir command? Or is there a more simple/focussed/specific way?
If the idea is a kind of BiDi-Light (just paragraph and text), then implementing a subset of Aleph's functionality (such as \pardir and textdir) seems like a good way to go.
(I imagine I don't see a single \beginR in ConTeXt's source code because it relies heavily on proper font support, probably beyond what the TFM system usually offers.)
which is where we will need Aleph and Bidi-Full
Also, is dev-context the right place for a discussion like this?
Please also cc the Aleph list (and forward this thread) because others there may find your project interesting or useful. If things get off-topic ConTeXt-wise then the Aleph list would be a good place to continue. Is Giuseppe aware of all of this (I assume he's on dev-context)? Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
Idris Samawi Hamid said this at Thu, 11 Nov 2004 14:37:58 -0700:
Please also cc the Aleph list (and forward this thread) because others there may find your project interesting or useful. If things get off-topic ConTeXt-wise then the Aleph list would be a good place to continue.
I forwarded your email to dev-context... come & join us, it's 12 people & low traffic. http://www.ntg.nl/mailman/listinfo/dev-context I don't have posting rights on the Aleph list, so I'll leave it to you to forward it in that direction. :) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Idris Samawi Hamid said this at Thu, 11 Nov 2004 14:37:58 -0700:
Hi Adam, & thnx for cc'ing me.
(Well, only natural: I was looking thru m-gamma to see how things were being used, and it had your name all over it.)
I just started thinking about further language support within ConTeXt now that the XeTeX-ConTeXt "basics" are done. XeTeX doesn't have the same character/line directionality control that is apparently in Omega, but it does control Right/Left typesetting fairly well.
I've been out of the loop on all things TeX for a while now (demands of my profession and other matters). I have a couple of general questions:
1. What exactly is the aim and purpose of XeTeX?
http://scripts.sil.org/xetex XeTeX is an updating of GXTeX. It is an amalgamation of eTeX with Unicode and Apple's advanced typography APIs, and is therefore Mac OS X only. Once cross-platform-ness is sacrificed, there are a lot of interesting benefits. Font installation issues drop to nearly zero--it has access to all fonts on the system--and Apple ships the systems with a fairly impressive array of intelligent fonts. The native Unicode support unlocks a lot of ConTeXt's stored multilingual potential, too.
2. Since its apparently based on eTeX, and since bidi seems to be of interest, why not integrate it with the Aleph project, also eTeX-based (with an eye towards ConTeXt), and which already has the bidi stuff implemented rather well?
I doubt it's headed that way, but Jonathan Kew, the developer, may well be swayed by certain of Omega's paragraph/text directionality constructs. I don't know it well enough, but William Adams seems to have a hand in the Omega pie, and is represented in the XeTeX community.
In particular, it makes a fairly big deal of its implementation of the eTeX beginR/beginL extensions. They seem to work fairly well in demos I've seen and simplistic tests I've done.
I was wondering about the bigger issues in terms of BiDi support, though. Do people want an interface that mimics Omega's \pardir command? Or is there a more simple/focussed/specific way?
If the idea is a kind of BiDi-Light (just paragraph and text), then implementing a subset of Aleph's functionality (such as \pardir and textdir) seems like a good way to go.
(I imagine I don't see a single \beginR in ConTeXt's source code because it relies heavily on proper font support, probably beyond what the TFM system usually offers.)
which is where we will need Aleph and Bidi-Full
The (too hidden) implication from me was that XeTeX does offer automatic text directionality, driven by the script and/or Unicode page. Noticing Hebrew in a default font, I tried spelling Aleph-Dalet-Mem in the middle of a roman paragraph, and it naturally (no markup needed) came out MDA. (Hans, incidentally, is a little disturbed by this sort of cleverness.)
Is Giuseppe aware of all of this (I assume he's on dev-context)?
Actually, looking at the distro list, it looks like he isn't! hi! -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
participants (3)
-
Adam Lindsay
-
Hans Hagen
-
Idris Samawi Hamid