Re: [NTG-context] Problem with ConTeXt (MkIV), Hebrew and ligatures

2012-10-10 Thread Sietse Brouwer
 But what left me really wondering this time was following. I tried to
 comment out U0xfb35 table in char-def.lua for proof that this solution
 should work at all. However, for my surprise, it had no effect at all. For
 just in case, I even purged my Ubuntu PPA packaged version of ConTeXt to
 make sure that this modification I made to standalone version is really
 used. No effect. I also checked that my TeX file should have the correct
 characters, not the already combined ones. No error in there either.

After changing one of ConTeXt's source files, you should remake the formats with

context --make cont-en

(or context --make, if you want to make the dutch/german/etc. interfaces, too.)

Can you try that, and let us know if it works?
Kind regards,
Sietse
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \unit and french

2012-10-10 Thread Sietse Brouwer
Hi Romain,

If inputting in the English format is an option, this works:

\setupunit[method=3] % comma as decimal mark, thin space for digits seperator
\units{12,345.00} %-- 12 345,00

The problem is that inputting in the French format does not work:
there seems to be a bug when order=reverse.

% doesn't work, of course: unexpected digits seperator after decimal mark (.)
\setupunit[method=3, order=normal]
\units{12.345,00}

% doesn't work correctly: comma is accepted as decimal mark at parse time,
% but then printed as thin space anyway. ?!?
\setupunit[method=3, order=reverse]
\units{12.345,00} %-- 12,345 00

I hope this helps you a bit.

Kind regards,
Sietse
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \unit and french

2012-10-10 Thread Romain Diss
Hi,

Thanks for the response.

 If inputting in the English format is an option, this works:
 \setupunit[method=3] % comma as decimal mark, thin space for digits
 seperator \units{12,345.00} %-- 12 345,00
Yes, I confirm it works (with \unit{12,345.00}). I'd prefer inputting in 
french but this should do the job.

 % doesn't work correctly: comma is accepted as decimal mark at parse time,
 % but then printed as thin space anyway. ?!?
 \setupunit[method=3, order=reverse]
 \units{12.345,00} %-- 12,345 00
This one should give what I need. Can someone confirm there is a bug here and 
if so, is it possible to fix it?

Thanks in advance.

-- 
Romain Diss
romain.d...@yahoo.fr
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Frozen callback.

2012-10-10 Thread Andre Caldas
 Why is document.MyCharacterMess a string?

 The sequencers use loadstring() internally (util-seq.lua), so you
 need to supply the namespace as a string. This happens all over
 the place with action/callbacks.

 more flexible this way (one can redefine, nil or whatever such functions)

It is like a pointer to a pointer. Or a reference to a reference,
since we do not use pointers in Lua.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \unit and french

2012-10-10 Thread Wolfgang Schuster

Am 10.10.2012 um 21:25 schrieb Romain Diss romain.d...@yahoo.fr:

 Hi,
 
 Thanks for the response.
 
 If inputting in the English format is an option, this works:
 \setupunit[method=3] % comma as decimal mark, thin space for digits
 seperator \units{12,345.00} %-- 12 345,00
 Yes, I confirm it works (with \unit{12,345.00}). I'd prefer inputting in 
 french but this should do the job.
 
 % doesn't work correctly: comma is accepted as decimal mark at parse time,
 % but then printed as thin space anyway. ?!?
 \setupunit[method=3, order=reverse]
 \units{12.345,00} %-- 12,345 00
 This one should give what I need. Can someone confirm there is a bug here and 
 if so, is it possible to fix it?

It is a bug and I know what’s wrong in the code but you have to wait till next 
week
when Hans is back from the conference. I going to send then a mail to Hans with
a description of this bug and also the one in Marcos link, both are in the Lua 
part
of the code and it’s no so easy for me to fix them.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \unit and french

2012-10-10 Thread Sietse Brouwer
Sietse wrote:
 % doesn't work correctly: comma is accepted as decimal mark at parse time,
 % but then printed as thin space anyway. ?!?
 \setupunit[method=3, order=reverse]
 \units{12.345,00} %-- 12,345 00

Wolfgang wrote:
 I going to send then a mail to Hans with
 a description of this bug and also the one in Marcos link, both are in the 
 Lua part
 of the code and it’s no so easy for me to fix them.

Actually, this bug is in the ConTeXt part of the code, in phys-dim.lua:

-\unexpanded\def\digitsfinalcomma  {\digitscommasymbol } %
more for tracing
\unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more
for tracing
\unexpanded\def\digitsintermediatecomma   {\digitscommasymbol } % more
for tracing
-\unexpanded\def\digitsintermediateperiod  {\digitsperiodsymbol} %
more for tracing

+\unexpanded\def\digitsfinalcomma  {\digitsperiodsymbol } %
more for tracing
\unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more
for tracing
\unexpanded\def\digitsintermediatecomma   {\digitscommasymbol } % more
for tracing
+\unexpanded\def\digitsintermediateperiod  {\digitscommasymbol} % more
for tracing

The mistake probably arose because \digitscommasymbol always
corresponds to the intermediate mark (the digits separator), not
always to the comma. I know the name wrong-footed me when I was
reading the code.

Romain: you can make this change in phys-dim.lua (around line 220),
then remake the formats with
context --make cont-en

Then this should work correctly:

% 3: decimal comma, digits space
% 4: decimal point, digits space

% English input (order=normal)
\setupunits[method=3]
\unit{11,122.13 micro mol per second} \par
\setupunits[method=4]
\unit{21,222.23 micro mol per second} \par

% French input (order=reverse)
\setupunits[method=3, order=reverse]
\unit{31.322,33 micro mol per second} \par
\setupunits[method=4, order=reverse]
\unit{41.422,43 micro mol per second} \par

Cheers,
Sietse
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with ConTeXt (MkIV), Hebrew and ligatures

2012-10-10 Thread Simo Ojala

But what left me really wondering this time was following. I tried to
comment out U0xfb35 table in char-def.lua for proof that this solution
should work at all. However, for my surprise, it had no effect at all. For
just in case, I even purged my Ubuntu PPA packaged version of ConTeXt to
make sure that this modification I made to standalone version is really
used. No effect. I also checked that my TeX file should have the correct
characters, not the already combined ones. No error in there either.


After changing one of ConTeXt's source files, you should remake the formats with

context --make cont-en

(or context --make, if you want to make the dutch/german/etc. interfaces, too.)

Can you try that, and let us know if it works?
Kind regards,
Sietse


Ok, thanks. After running 'context --make cont-en' it works. So at least 
the concept is now proofed with my setup.


Now that I learned to make modifications to ConTeXt effective, I made 
following observations. If I comment out lines 485 and 486 from 
char-utf.lua (should be the only two lines of function 
characters.filters.utf.enable()) I am able to turn collapsing on and off 
with following command line calls.


context --directives=filters.utf.collapse=true testcase.tex
context --directives=filters.utf.collapse=false testcase.tex

However, this also turns collapsing off by default. When there is no 
modifications to ConTeXt, I still don't know how to toggle this thing on 
and off.


So, maybe char-utf.lua is still flawed or I am still missing something.

Thank you for your help,

Simo


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___