Re: [NTG-context] Aleph queries
Idris wrote:
I doubt it, but something along these lines should do it:
====== % tex=aleph output=dvipdfmx \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT \hoffset=0pt % bug
\starttext
\chapter{Cow}
\section{Dutch Cow}
\placefigure [middle] [fig:cow] {This is an example of a cow.} {\externalfigure[cow][width=1.5in]}
\section{Another Dutch Cow}
\placefigure [middle] [fig:cow] {This is an example of a cow.} {\externalfigure[cow][width=1.5in]}
\stoptext
======
Hmm, seems to work here; maybe Duncan did not use \bodydir TRT?
I agree the above works, but when I use Arabic fonts and content it doesn't seem to. I have new tex and pdf files at: http://www.capdm.com/public/context/figtest.tex and http://www.capdm.com/public/context/figtest.pdf
Hans: How do we configure the "."=>"-" separator?
This I have worked out! \setupcaption[figure][separator=-] Doh. Thanks, Duncan
Duncan Hothersall wrote:
I agree the above works, but when I use Arabic fonts and content it doesn't seem to.
I have new tex and pdf files at:
http://www.capdm.com/public/context/figtest.tex and http://www.capdm.com/public/context/figtest.pdf
hm, some weird interaction between opt's and directions and context reversing numbers ... i must look into it what we need is a test doc with all relevant typo concepts that needs special treatment (either or not reversion) so that we can deal with all of them 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 -----------------------------------------------------------------
Duncan Hothersall wrote:
I agree the above works, but when I use Arabic fonts and content it doesn't seem to.
still puzzling things like this (imo) conform that the ability to typeset in multiple directions not means that one claim to have a multilingual tex the problem is that there's always a mixture between this auto r/l stuff and explicit r/l stuff and one never knows (also depends on the otp's it seems) what happens: now we can have situations that the input parser reverse things that are already reversed and one never knows why/where (since those opt's have kind of unpredictable side effects (apart from bugs - i just ran out of mem again) figure [num1] . [num2] . [num3] should come out as [num3] . [num2] . [num1] erugif depending on when an otp decides that it should stop we get something else In any case, the num snippets needs to be otp'd in order to get proper arab, at the same time there's this *dir stuff, ... (omega was never made for such things, only simple docs with straightforward input, not too much macro package stuff involved) 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 -----------------------------------------------------------------
Hi, Hans Hagen wrote:
figure [num1] . [num2] . [num3]
should come out as
[num3] . [num2] . [num1] erugif
We discovered that the arabic contextual analyzation OTP assumes that any sequence of [0-9.+-]+ is a single number and should be typeset in TLT mode. For figure numbers and version numbers etcetera this assumption is wrong (they are multiple numbers concatenated together). A trick (?) is to change the separator such that the number parsing in the otp see separate numbers as well: \setupcaptions[separator={{.}}] Cheers, Taco
Taco Hoekwater wrote:
Hi,
Hans Hagen wrote:
figure [num1] . [num2] . [num3]
should come out as
[num3] . [num2] . [num1] erugif
We discovered that the arabic contextual analyzation OTP assumes that any sequence of [0-9.+-]+ is a single number and should be typeset in TLT mode.
just curious: does this make sense? why is this?
For figure numbers and version numbers etcetera this assumption is wrong (they are multiple numbers concatenated together).
A trick (?) is to change the separator such that the number parsing in the otp see separate numbers as well:
\setupcaptions[separator={{.}}]
or a bit more extensive: \def\ArabicUTF {\ArabicDirGlobal \usefiltersequence[UTFArabic]% % not needed: \reversesectionnumberstrue \switchtobodyfont[omarb]} \setupheads [separator={{.}}] \setupcaptions[separator={{.}}] this still gives problems with refering to a graphic but for that we need more hackery 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 -----------------------------------------------------------------
Duncan Hothersall wrote:
Idris wrote:
I doubt it, but something along these lines should do it:
====== % tex=aleph output=dvipdfmx \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT \hoffset=0pt % bug
\starttext
\chapter{Cow}
\section{Dutch Cow}
\placefigure [middle] [fig:cow] {This is an example of a cow.} {\externalfigure[cow][width=1.5in]}
\section{Another Dutch Cow}
\placefigure [middle] [fig:cow] {This is an example of a cow.} {\externalfigure[cow][width=1.5in]}
\stoptext
======
Hmm, seems to work here; maybe Duncan did not use \bodydir TRT?
I tend to think that we should start with
\def\ArabicUTF {\ArabicDirGlobal \usefiltersequence[UTFArabic]% % \reversesectionnumberstrue \switchtobodyfont[omarb]% \ArabicDirGlobal} \ArabicUTF \setuplabeltext[figure=استخلاØ~] so, no reversing; the question is, why isn't this piece reflected in arab while ok in reflected english 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 -----------------------------------------------------------------
participants (3)
-
Duncan Hothersall
-
Hans Hagen
-
Taco Hoekwater