[NTG-context] luatex feature question/request

2008-04-03 Thread Marcin Borkowski
Hello! I was just wondering, whether something like this is possible in luatex - and if not, if it might be implemented;). I'd like to be able to transform somehow the input right *before* TeX sees it. What I mean is e.g. a transformation using regexps. Application I have in mind is as follows:

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Hans Hagen
Marcin Borkowski wrote: > Hello! > > I was just wondering, whether something like this is possible in luatex > - and if not, if it might be implemented;). I'd like to be able to > transform somehow the input right *before* TeX sees it. What I mean is > e.g. a transformation using regexps. Appli

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Taco Hoekwater
Hans Hagen wrote: > Marcin Borkowski wrote: >> Hello! >> >> I was just wondering, whether something like this is possible in luatex >> - and if not, if it might be implemented;). I'd like to be able to >> transform somehow the input right *before* TeX sees it. What I mean is >> e.g. a transform

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Taco Hoekwater
luigi scarso wrote: >> There actually is a way to modify the input lines just before they >> are parsed by luatex, but that is really only suitable for converting >> 8-bit encodings to utf-8. (I was going to post an example abusing >> that method, but there are way many things that can go wro

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Olivier Guéry
On Fri, Apr 4, 2008 at 10:52 AM, Taco Hoekwater <[EMAIL PROTECTED]> wrote: > > > luigi scarso wrote: > >> There actually is a way to modify the input lines just before they > >> are parsed by luatex, but that is really only suitable for converting > >> 8-bit encodings to utf-8. (I was going

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread luigi scarso
> There actually is a way to modify the input lines just before they > are parsed by luatex, but that is really only suitable for converting > 8-bit encodings to utf-8. (I was going to post an example abusing > that method, but there are way many things that can go wrong, so I > changed my min

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Hans Hagen
Olivier Guéry wrote: > On Fri, Apr 4, 2008 at 10:52 AM, Taco Hoekwater <[EMAIL PROTECTED]> wrote: >> >> luigi scarso wrote: >> >> There actually is a way to modify the input lines just before they >> >> are parsed by luatex, but that is really only suitable for converting >> >> 8-bit encodin

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread luigi scarso
On Fri, Apr 4, 2008 at 10:52 AM, Taco Hoekwater <[EMAIL PROTECTED]> wrote: > > > luigi scarso wrote: > >> There actually is a way to modify the input lines just before they > >> are parsed by luatex, but that is really only suitable for converting > >> 8-bit encodings to utf-8. (I was going

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Marcin Borkowski
Dnia Fri, Apr 04, 2008 at 09:50:55AM +0200, Hans Hagen napisał(a): > Marcin Borkowski wrote: > > Hello! > > > > I was just wondering, whether something like this is possible in luatex > > - and if not, if it might be implemented;). I'd like to be able to > > transform somehow the input right *bef

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Peter Münster
On Fri, Apr 04 2008, Olivier Guéry wrote: > Hello, new to this list, I see this first message. Is it a solution > for my request (http://wiki.contextgarden.net/Feature_Requests) about > french typography ? Hello, You could also try the latest version of t-french.tex on http://pmrb.free.fr/work/O

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Olivier Guéry
> > Hello, new to this list, I see this first message. Is it a solution > > for my request (http://wiki.contextgarden.net/Feature_Requests) about > > french typography ? > > \setcharacterspacing [frenchpunctuation] Thank's a lot. It's great ! I Test it with this : Test; test: test? test! \cr

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Wolfgang Schuster
On Fri, Apr 4, 2008 at 1:02 PM, Olivier Guéry <[EMAIL PROTECTED]> wrote: > > > Hello, new to this list, I see this first message. Is it a solution > > > for my request (http://wiki.contextgarden.net/Feature_Requests) about > > > french typography ? > > > > \setcharacterspacing [frenchpunctuatio

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Olivier Guéry
> You could also try to use the MkIV version. > > from core-spa.mkiv > > % experimental spacing > % > % test: oeps {\setcharacterspacing[frenchpunctuation]x: xx \bfd x: xx} > oeps: test > I see this when I search in the file but don't know how to try this… (I'm not a software ingineer at all

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Hans Hagen
Olivier Guéry wrote: >> > Hello, new to this list, I see this first message. Is it a solution >> > for my request (http://wiki.contextgarden.net/Feature_Requests) about >> > french typography ? >> >> \setcharacterspacing [frenchpunctuation] > > Thank's a lot. It's great ! > > I Test it with t

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Peter Münster
On Fri, Apr 04 2008, Olivier Guéry wrote: > > You could also try to use the MkIV version. > > > > from core-spa.mkiv > > > > % experimental spacing > > % > > % test: oeps {\setcharacterspacing[frenchpunctuation]x: xx \bfd x: xx} > > oeps: test > > > > I see this when I search in the file but

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Olivier Guéry
> > It seems that only the english input get the spacing. > > Don't know why but the sign « ; » of the english input don't get the > spacing. > > You put the value to .25em, looking in the french extension (who can't > > play with utf8) there's a .16667em value. It's seem's that the > > small

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Olivier Guéry
> Between "nbsp" and ":" is a nonbreakable space, and indeed there is no > line-break. > > Between "thinspace" and ":" is a nonbreakable thin-space, and also no > line-break. > > Between "normalspace" and ":" is a normal space, so there is a line-break. > > Does this look like what you want?

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Peter Münster
On Fri, Apr 04 2008, Olivier Guéry wrote: > The problem is that even if the space before « : » is not a nbsp, it > should be a thin nbsp (only silly guys like me change their layout to > have nbsp on Shift+space ;o)). Hello, Just my personal opinion: I always write these characters without any s

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Aditya Mahajan
On Fri, 4 Apr 2008, Peter Münster wrote: On Fri, Apr 04 2008, Taco Hoekwater wrote: % engine=luatex \startluacode function add_ties (line) return line:gsub(' ','~') end \stopluacode \def\startfiltered {\ctxlua {callback.register('process_input_buffer', add_ties)}} \def

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Peter Münster
On Fri, Apr 04 2008, Aditya Mahajan wrote: >> function add_ties(line) >> line = line:gsub('( %a) ', '%1~') >> line = line:gsub('^(%a) ', '%1~') >> line = line:gsub('( %a)$', '%1~%%') >> return line >> end >> >> Not working: $a = b + c$. > > How about substituting with a macro \

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Peter Münster
On Fri, Apr 04 2008, Taco Hoekwater wrote: > >% engine=luatex > >\startluacode >function add_ties (line) return line:gsub(' ','~') end >\stopluacode > >\def\startfiltered > {\ctxlua {callback.register('process_input_buffer', add_ties)}} >\def\stopfiltered > {\ct

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Hans Hagen
Aditya Mahajan wrote: >> Perhaps this one could be already useable for the OP: >> >> function add_ties(line) >> line = line:gsub('( %a) ', '%1~') >> line = line:gsub('^(%a) ', '%1~') >> line = line:gsub('( %a)$', '%1~%%') >> return line >> end >> >> Not working: $a = b + c$. > > H

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Taco Hoekwater
Peter Münster wrote: > > Hello, > > Perhaps this one could be already useable for the OP: > > function add_ties(line) > line = line:gsub('( %a) ', '%1~') > line = line:gsub('^(%a) ', '%1~') > line = line:gsub('( %a)$', '%1~%%') > return line > end Hey! Luigi promised you

Re: [NTG-context] luatex feature question/request

2008-04-04 Thread Olivier Guéry
> Just my personal opinion: I always write these characters without any space > before, because: > - more space, more to type > - the space is a matter of typography, so up to ConTeXt and not to the > author > - in all other languages there is no space to type (so I keep my habits) > - if I

Re: [NTG-context] luatex feature question/request

2008-04-15 Thread Hans Hagen
Olivier Guéry wrote: > Looking to my tests it seems that if there's a space in the source > file, the spacing is not apply — and I guess the nbsp neither. > So, what would be great is we had something that say : no mater what > is in front of this punctuations (space, nbsp or nothing) just make >

Re: [NTG-context] luatex feature question/request

2008-04-15 Thread Olivier Guéry
On Tue, Apr 15, 2008 at 9:18 PM, Hans Hagen <[EMAIL PROTECTED]> wrote: > Olivier Guéry wrote: > > > Looking to my tests it seems that if there's a space in the source > > file, the spacing is not apply — and I guess the nbsp neither. > > So, what would be great is we had something that say : no

Re: [NTG-context] luatex feature question/request

2008-04-15 Thread Arthur Reutenauer
>but if we support such a > thing, we need a better specification; there are probably more space > related chars that needs treatment then There's not much to it, actually. There are some space characters in Unicode, and we should handle them as

Re: [NTG-context] luatex feature question/request

2008-04-16 Thread Hans Hagen
Arthur Reutenauer wrote: >>but if we support such a >> thing, we need a better specification; there are probably more space >> related chars that needs treatment then > > There's not much to it, actually. There are some space characters in > Uni

Re: [NTG-context] luatex feature question/request

2008-04-16 Thread Olivier Guéry
On Wed, Apr 16, 2008 at 10:50 AM, Hans Hagen <[EMAIL PROTECTED]> wrote: > Arthur Reutenauer wrote: > >>but if we support such a > >> thing, we need a better specification; there are probably more space > >> related chars that needs treatment then >

Re: [NTG-context] luatex feature question/request

2008-04-16 Thread Peter Münster
On Wed, Apr 16 2008, Olivier Guéry wrote: > I can't imagine a french text without those spaces. So maybe this > specific question should be on for all french text, and something like > \setcharacterspacing [frenchpunctuation] [no] can be use for the > excepts. There is already "\setcharacterspac

Re: [NTG-context] luatex feature question/request

2008-04-16 Thread Hans Hagen
Peter Münster wrote: > On Wed, Apr 16 2008, Olivier Guéry wrote: > >> I can't imagine a french text without those spaces. So maybe this >> specific question should be on for all french text, and something like >> \setcharacterspacing [frenchpunctuation] [no] can be use for the >> excepts. > > Th

Re: [NTG-context] luatex feature question/request

2008-07-04 Thread Marcin Borkowski
Hi all, 3 months ago (on Friday, April 4) I asked about an option for luatex to automatically put ties before one-letter words. Hans asked me to remind about it in a few months, so I do it now;). (I can't answer in that thread since I delete old mails:( ). BTW, I guess such a feature might be a

Re: [NTG-context] luatex feature question/request

2008-07-04 Thread Idris Samawi Hamid ادريس سماوي ح امد
Hi Marcin, On Fri, 04 Jul 2008 04:54:26 -0600, Marcin Borkowski <[EMAIL PROTECTED]> wrote: > 3 months ago (on Friday, April 4) I asked about an option for luatex to > automatically put ties before one-letter words. Hans asked me to remind > about it in a few months, so I do it now;). (I can't

Re: [NTG-context] luatex feature question/request

2008-07-04 Thread Olivier
Quoting "Idris Samawi Hamid ?? ?? " : > -- was [EMAIL PROTECTED] on Jul 04, 2008 at 08:23:19AM -- > On Fri, 04 Jul 2008 04:54:26 -0600, Marcin Borkowski > <[EMAIL PROTECTED]> wrote: > > > 3 months ago (on Friday, April 4) I asked about an option for luatex to > > automa

Re: [NTG-context] luatex feature question/request

2008-07-04 Thread Idris Samawi Hamid ادريس سماوي ح امد
On Fri, 04 Jul 2008 09:01:13 -0600, Olivier <[EMAIL PROTECTED]> wrote: >> Interesting, I was thinking about something similar recently: >> >> A user should be able to define or augment a database such that >> many-to-most ties are done automatically: > > I am a bit affraid by such a feature: there

Re: [NTG-context] luatex feature question/request

2008-07-04 Thread Hans Hagen
Idris Samawi Hamid ادريس سماوي حامد wrote: > On Fri, 04 Jul 2008 09:01:13 -0600, Olivier <[EMAIL PROTECTED]> wrote: > >>> Interesting, I was thinking about something similar recently: >>> >>> A user should be able to define or augment a database such that >>> many-to-most ties are done automatical

Re: [NTG-context] luatex feature question/request

2008-07-04 Thread Hans Hagen
Idris Samawi Hamid ادريس سماوي حامد wrote: > I guess this is a mkiv issue, not a luatex issue per se. indeed, comparable with the automated (blabla)blabla hyphenation feature already present -