ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* luatex feature question/request
@ 2008-04-04  5:09 Marcin Borkowski
  2008-04-04  7:50 ` Hans Hagen
  0 siblings, 1 reply; 37+ messages in thread
From: Marcin Borkowski @ 2008-04-04  5:09 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

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: in Polish, there are a few prepositions which are one-letter
words; it's a bad custom to leave them hanging at the end of a line.
Such an option could automatically put ties (~) instead of spaces after
them - a feature sometimes requested by Polish TeX users.

Yours,

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  5:09 luatex feature question/request Marcin Borkowski
@ 2008-04-04  7:50 ` Hans Hagen
  2008-04-04  8:33   ` Taco Hoekwater
  2008-04-04  9:57   ` Marcin Borkowski
  0 siblings, 2 replies; 37+ messages in thread
From: Hans Hagen @ 2008-04-04  7:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.  Application I have in mind is as
> follows: in Polish, there are a few prepositions which are one-letter
> words; it's a bad custom to leave them hanging at the end of a line.
> Such an option could automatically put ties (~) instead of spaces after
> them - a feature sometimes requested by Polish TeX users.

input parsing is not needed here, it's easier to to do this on the node 
list; remind me in a few months (it's rather trivial to implmenent since 
the infrastructure is already in mkiv)

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  7:50 ` Hans Hagen
@ 2008-04-04  8:33   ` Taco Hoekwater
  2008-04-04  8:38     ` luigi scarso
  2008-04-04  9:57   ` Marcin Borkowski
  1 sibling, 1 reply; 37+ messages in thread
From: Taco Hoekwater @ 2008-04-04  8:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users



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 transformation using regexps.  Application I have in mind is as
>> follows: in Polish, there are a few prepositions which are one-letter
>> words; it's a bad custom to leave them hanging at the end of a line.
>> Such an option could automatically put ties (~) instead of spaces after
>> them - a feature sometimes requested by Polish TeX users.
> 
> input parsing is not needed here, it's easier to to do this on the node 
> list; remind me in a few months (it's rather trivial to implmenent since 
> the infrastructure is already in mkiv)

Hans is right, the node list should be altered instead of the input,
because you can never be sure that "\TEX\ i \METAFONT\" is not
hidden inside a definition somewhere.

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 mind)

Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  8:33   ` Taco Hoekwater
@ 2008-04-04  8:38     ` luigi scarso
  2008-04-04  8:52       ` Taco Hoekwater
  0 siblings, 1 reply; 37+ messages in thread
From: luigi scarso @ 2008-04-04  8:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>  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 mind)
Post it anyway.
We are all adults.



-- 
luigi
it's new .
it's powerful .
it's luatex .
http://www.luatex.org
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  8:38     ` luigi scarso
@ 2008-04-04  8:52       ` Taco Hoekwater
  2008-04-04  8:58         ` Olivier Guéry
                           ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Taco Hoekwater @ 2008-04-04  8:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users



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 wrong, so I
>>  changed my mind)
> Post it anyway.
> We are all adults.

If you say so ...

   % engine=luatex

   \startluacode
   function add_ties (line) return line:gsub(' ','~') end
   \stopluacode

   \def\startfiltered
     {\ctxlua {callback.register('process_input_buffer', add_ties)}}
   \def\stopfiltered
     {\ctxlua {callback.register('process_input_buffer', nil)}}

   \starttext
   \startfiltered
   Thus, I came to the conclusion that the designer of a new system
   must not only be the implementer and first large||scale user; the
   designer should also write the first user manual.
   \stopfiltered
   \stoptext

Notice how it breaks only at hyphens? If you think that is because
those are the only valid breakpoints, you are actually slightly wrong:
there are still 'normal' spaces between 'system' and 'must' and between
'the' and 'designer' (because EOL is converted to a space *after*
reading in the line buffer).

The lua function is _much_ too simple. It will happily convert '\ '
into '\~', $a = 2~$ into $a~=~2~$, and "\TEX is" into "\TEX~is".

Best wishes,
Taco


___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  8:52       ` Taco Hoekwater
@ 2008-04-04  8:58         ` Olivier Guéry
  2008-04-04  9:08           ` Hans Hagen
  2008-04-04 10:16           ` Peter Münster
  2008-04-04  9:19         ` luigi scarso
  2008-04-04 19:26         ` Peter Münster
  2 siblings, 2 replies; 37+ messages in thread
From: Olivier Guéry @ 2008-04-04  8:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Apr 4, 2008 at 10:52 AM, Taco Hoekwater <taco@elvenkind.com> 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 to post an example abusing
>  >>  that method, but there are way many things that can go wrong, so I
>  >>  changed my mind)
>  > Post it anyway.
>  > We are all adults.
>
>  If you say so ...
>
>    % engine=luatex
>
>    \startluacode
>    function add_ties (line) return line:gsub(' ','~') end
>    \stopluacode

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 ?

Thx,
Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  8:58         ` Olivier Guéry
@ 2008-04-04  9:08           ` Hans Hagen
  2008-04-04 11:02             ` Olivier Guéry
  2008-04-04 10:16           ` Peter Münster
  1 sibling, 1 reply; 37+ messages in thread
From: Hans Hagen @ 2008-04-04  9:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Olivier Guéry wrote:
> On Fri, Apr 4, 2008 at 10:52 AM, Taco Hoekwater <taco@elvenkind.com> 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 to post an example abusing
>>  >>  that method, but there are way many things that can go wrong, so I
>>  >>  changed my mind)
>>  > Post it anyway.
>>  > We are all adults.
>>
>>  If you say so ...
>>
>>    % engine=luatex
>>
>>    \startluacode
>>    function add_ties (line) return line:gsub(' ','~') end
>>    \stopluacode
> 
> 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]


-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  8:52       ` Taco Hoekwater
  2008-04-04  8:58         ` Olivier Guéry
@ 2008-04-04  9:19         ` luigi scarso
  2008-04-04 19:26         ` Peter Münster
  2 siblings, 0 replies; 37+ messages in thread
From: luigi scarso @ 2008-04-04  9:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Apr 4, 2008 at 10:52 AM, Taco Hoekwater <taco@elvenkind.com> 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 to post an example abusing
>  >>  that method, but there are way many things that can go wrong, so I
>  >>  changed my mind)
>  > Post it anyway.
>  > We are all adults.
>
>  If you say so ...
>
>    % engine=luatex
>
>    \startluacode
>    function add_ties (line) return line:gsub(' ','~') end
>    \stopluacode
>
>    \def\startfiltered
>      {\ctxlua {callback.register('process_input_buffer', add_ties)}}
>    \def\stopfiltered
>      {\ctxlua {callback.register('process_input_buffer', nil)}}
>
>    \starttext
>    \startfiltered
>    Thus, I came to the conclusion that the designer of a new system
>    must not only be the implementer and first large||scale user; the
>    designer should also write the first user manual.
>    \stopfiltered
>    \stoptext
>
>  Notice how it breaks only at hyphens? If you think that is because
>  those are the only valid breakpoints, you are actually slightly wrong:
>  there are still 'normal' spaces between 'system' and 'must' and between
>  'the' and 'designer' (because EOL is converted to a space *after*
>  reading in the line buffer).
>
>  The lua function is _much_ too simple. It will happily convert '\ '
>  into '\~', $a = 2~$ into $a~=~2~$, and "\TEX is" into "\TEX~is".

ok, many thanks.


-- 
luigi
it's new .
it's powerful .
it's luatex .
http://www.luatex.org
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  7:50 ` Hans Hagen
  2008-04-04  8:33   ` Taco Hoekwater
@ 2008-04-04  9:57   ` Marcin Borkowski
  1 sibling, 0 replies; 37+ messages in thread
From: Marcin Borkowski @ 2008-04-04  9:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dnia Fri, Apr 04, 2008 at 09:50:55AM +0200, Hans Hagen napisa&#322;(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 *before* TeX sees it.  What I mean is
> > e.g. a transformation using regexps.  Application I have in mind is as
> > follows: in Polish, there are a few prepositions which are one-letter
> > words; it's a bad custom to leave them hanging at the end of a line.
> > Such an option could automatically put ties (~) instead of spaces after
> > them - a feature sometimes requested by Polish TeX users.
> 
> input parsing is not needed here, it's easier to to do this on the node 
> list; remind me in a few months (it's rather trivial to implmenent since 
> the infrastructure is already in mkiv)

Thanks a lot;).  I've set up a reminder in 3 months' time;).

> 
> Hans

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  8:58         ` Olivier Guéry
  2008-04-04  9:08           ` Hans Hagen
@ 2008-04-04 10:16           ` Peter Münster
  1 sibling, 0 replies; 37+ messages in thread
From: Peter Münster @ 2008-04-04 10:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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/OS/ConTeXt/

I'll put it shortly on http://modules.contextgarden.net/ (and some other
updates). Then it should be integrated into the distribution I think.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  9:08           ` Hans Hagen
@ 2008-04-04 11:02             ` Olivier Guéry
  2008-04-04 11:15               ` Wolfgang Schuster
  2008-04-04 12:26               ` Hans Hagen
  0 siblings, 2 replies; 37+ messages in thread
From: Olivier Guéry @ 2008-04-04 11:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>  > 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! \crlf %english input
Test : test ; test ? test ! \crlf %french input
Test ; test : test ? test ! \crlf %french with nbsp

Et 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
smallest is better because the caracter belong to the word, he's not
between the two words.

regards,
Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 11:02             ` Olivier Guéry
@ 2008-04-04 11:15               ` Wolfgang Schuster
  2008-04-04 12:26                 ` Olivier Guéry
  2008-04-04 12:26               ` Hans Hagen
  1 sibling, 1 reply; 37+ messages in thread
From: Wolfgang Schuster @ 2008-04-04 11:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Apr 4, 2008 at 1:02 PM, Olivier Guéry <nemolivier@gmail.com> 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 this :
>
> Test; test: test? test! \crlf %english input
> Test : test ; test ? test ! \crlf %french input
> Test ; test : test ? test ! \crlf %french with nbsp
>
> Et 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
> smallest is better because the caracter belong to the word, he's not
> between the two words.

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

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 11:15               ` Wolfgang Schuster
@ 2008-04-04 12:26                 ` Olivier Guéry
  2008-04-04 12:55                   ` Peter Münster
  0 siblings, 1 reply; 37+ messages in thread
From: Olivier Guéry @ 2008-04-04 12:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>  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, but a typography fan).
It fact the « problem » for the moment is that I put space (and nbsp)
in all my source documents (as all the french people, I think)… And it
seems that ConTeXt can't deal with this for the moment.

Thx,
Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 11:02             ` Olivier Guéry
  2008-04-04 11:15               ` Wolfgang Schuster
@ 2008-04-04 12:26               ` Hans Hagen
  2008-04-04 13:09                 ` Olivier Guéry
  1 sibling, 1 reply; 37+ messages in thread
From: Hans Hagen @ 2008-04-04 12:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 this :
> 
> Test; test: test? test! \crlf %english input
> Test : test ; test ? test ! \crlf %french input
> Test ; test : test ? test ! \crlf %french with nbsp
> 
> Et 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
> smallest is better because the caracter belong to the word, he's not
> between the two words.

you have to be more explicit; for instance, what do you mean with 
'french input'

it's an attribute, not coupled to a language, but grouping should work 
ok; npsp is not intercepted (no problem to do that)

i can add all kind of thins but then need precise specs + test files


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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 12:26                 ` Olivier Guéry
@ 2008-04-04 12:55                   ` Peter Münster
  2008-04-04 13:15                     ` Olivier Guéry
  0 siblings, 1 reply; 37+ messages in thread
From: Peter Münster @ 2008-04-04 12:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 don't know how to try this…
> (I'm not a software ingineer at all, but a typography fan).
> It fact the « problem » for the moment is that I put space (and nbsp)
> in all my source documents (as all the french people, I think)… And it
> seems that ConTeXt can't deal with this for the moment.

It seems, that ConTeXt deals with that very well (attention, the following
code is utf8):

% engine=luatex

\starttext
\hsize1mm
nbsp : test

thinspace : test

normalspace : test
\stoptext

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?

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 12:26               ` Hans Hagen
@ 2008-04-04 13:09                 ` Olivier Guéry
  2008-04-15 19:18                   ` Hans Hagen
  0 siblings, 1 reply; 37+ messages in thread
From: Olivier Guéry @ 2008-04-04 13:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

>  > 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
>  > smallest is better because the caracter belong to the word, he's not
>  > between the two words.
>
>  you have to be more explicit; for instance, what do you mean with
>  'french input'
>
>  it's an attribute, not coupled to a language, but grouping should work
>  ok; npsp is not intercepted (no problem to do that)
>
>  i can add all kind of thins but then need precise specs + test files

Realy sorry for my bads explanations (and for my bad english…). Here
is a test file. I use the last ConTeXt, with lua.

Let's resume : In french typography, : ; ? !  « and  » must have a
small nbsp (« — » too but it's too complicated, not always, so using a
« ~ » is better).
By « french input » I mean : when I type my source files I do put
spaces (and in my case nbsp, because I add it to my keyboard) before
those signs (it's the « natural » way we learn).
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
them nbsp with the right spacing !

Guillemots may be treated differently : as you said the \quote are
here for ; but If it's not a problem to leave "«" and "»" in the
\setcharacterspacing [frenchpunctuation] it would be great too.

Regards,
Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com

[-- Attachment #2: test-french-punctuation.tex --]
[-- Type: application/x-tex, Size: 444 bytes --]

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 12:55                   ` Peter Münster
@ 2008-04-04 13:15                     ` Olivier Guéry
  2008-04-04 15:15                       ` Peter Münster
  0 siblings, 1 reply; 37+ messages in thread
From: Olivier Guéry @ 2008-04-04 13:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>  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?

Thank's,

See my  last post.
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)).

Cheers, Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 13:15                     ` Olivier Guéry
@ 2008-04-04 15:15                       ` Peter Münster
  2008-04-04 20:23                         ` Olivier Guéry
  0 siblings, 1 reply; 37+ messages in thread
From: Peter Münster @ 2008-04-04 15:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 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 use a normal space, the word-wrapping of my editor (emacs)
  can introduce line-breaks there
- using nbsp (shift-space) means even more keypresses

Cheers, Peter

P.S.: As a French guy, what do you think about t-french.tex?

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04  8:52       ` Taco Hoekwater
  2008-04-04  8:58         ` Olivier Guéry
  2008-04-04  9:19         ` luigi scarso
@ 2008-04-04 19:26         ` Peter Münster
  2008-04-04 19:48           ` Aditya Mahajan
  2008-04-04 20:20           ` Taco Hoekwater
  2 siblings, 2 replies; 37+ messages in thread
From: Peter Münster @ 2008-04-04 19:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
>      {\ctxlua {callback.register('process_input_buffer', nil)}}
> 
>    \starttext
>    \startfiltered
>    Thus, I came to the conclusion that the designer of a new system
>    must not only be the implementer and first large||scale user; the
>    designer should also write the first user manual.
>    \stopfiltered
>    \stoptext
> 
> Notice how it breaks only at hyphens? If you think that is because
> those are the only valid breakpoints, you are actually slightly wrong:
> there are still 'normal' spaces between 'system' and 'must' and between
> 'the' and 'designer' (because EOL is converted to a space *after*
> reading in the line buffer).
> 
> The lua function is _much_ too simple. It will happily convert '\ '
> into '\~', $a = 2~$ into $a~=~2~$, and "\TEX is" into "\TEX~is".

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

Not working: $a = b + c$.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 19:26         ` Peter Münster
@ 2008-04-04 19:48           ` Aditya Mahajan
  2008-04-04 20:03             ` Peter Münster
  2008-04-04 20:07             ` Hans Hagen
  2008-04-04 20:20           ` Taco Hoekwater
  1 sibling, 2 replies; 37+ messages in thread
From: Aditya Mahajan @ 2008-04-04 19:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1622 bytes --]

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\stopfiltered
>>      {\ctxlua {callback.register('process_input_buffer', nil)}}
>>
>>    \starttext
>>    \startfiltered
>>    Thus, I came to the conclusion that the designer of a new system
>>    must not only be the implementer and first large||scale user; the
>>    designer should also write the first user manual.
>>    \stopfiltered
>>    \stoptext
>>
>> Notice how it breaks only at hyphens? If you think that is because
>> those are the only valid breakpoints, you are actually slightly wrong:
>> there are still 'normal' spaces between 'system' and 'must' and between
>> 'the' and 'designer' (because EOL is converted to a space *after*
>> reading in the line buffer).
>>
>> The lua function is _much_ too simple. It will happily convert '\ '
>> into '\~', $a = 2~$ into $a~=~2~$, and "\TEX is" into "\TEX~is".
>
> 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
>
> Not working: $a = b + c$.

How about substituting with a macro \nonbreakbablespace (instead of ~) and 
redefining \nonbreakablespace to \relax using \everymathematics or 
\mathortext?

Aditya

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 19:48           ` Aditya Mahajan
@ 2008-04-04 20:03             ` Peter Münster
  2008-04-04 20:07             ` Hans Hagen
  1 sibling, 0 replies; 37+ messages in thread
From: Peter Münster @ 2008-04-04 20:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 \nonbreakbablespace (instead of ~) and 
> redefining \nonbreakablespace to \relax using \everymathematics or 
> \mathortext?

Even better of course!
Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 19:48           ` Aditya Mahajan
  2008-04-04 20:03             ` Peter Münster
@ 2008-04-04 20:07             ` Hans Hagen
  1 sibling, 0 replies; 37+ messages in thread
From: Hans Hagen @ 2008-04-04 20:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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$.
> 
> How about substituting with a macro \nonbreakbablespace (instead of ~) 
> and redefining \nonbreakablespace to \relax using \everymathematics or 
> \mathortext?

and then ending up with the same mess as usual ... exceptions, 
exceptions, exceptions ... just think of boxed text inside math which 
then needs to have it enabled again

really, node lists is the way to go (although i admit that currently i 
do not handle math (also because it's a big todo in luatex)

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 19:26         ` Peter Münster
  2008-04-04 19:48           ` Aditya Mahajan
@ 2008-04-04 20:20           ` Taco Hoekwater
  1 sibling, 0 replies; 37+ messages in thread
From: Taco Hoekwater @ 2008-04-04 20:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 were all adults! :-)

Cheers, Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 15:15                       ` Peter Münster
@ 2008-04-04 20:23                         ` Olivier Guéry
  0 siblings, 0 replies; 37+ messages in thread
From: Olivier Guéry @ 2008-04-04 20:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>  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 use a normal space, the word-wrapping of my editor (emacs)
>   can introduce line-breaks there
>  - using nbsp (shift-space) means even more keypresses

Of course, it depend of the usage but most french put spaces. I'm use
to put them (and nbsp) because of mails, wikis, etc.
I know, and it's up to ConTeXt to put the right spaces. But for me it
must be able te deal with the fact that french people put spaces in
the source.

>  P.S.: As a French guy, what do you think about t-french.tex?

It's great to have it. But for me this question of spaces must be in
context and not in an extension : when I say « \mainlanguage [fr] »
spaces are supposed to be good — there's no french texte with no space
before thoses signs.
But I don't know what are the rules for context. If I must use a third
package, let's do it !

Cheers,
Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-04 13:09                 ` Olivier Guéry
@ 2008-04-15 19:18                   ` Hans Hagen
  2008-04-15 19:54                     ` Olivier Guéry
  2008-04-16  0:40                     ` Arthur Reutenauer
  0 siblings, 2 replies; 37+ messages in thread
From: Hans Hagen @ 2008-04-15 19:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> them nbsp with the right spacing !

it's no problem to add avariant that treats nospace, space, nbsp as 
equel, and removes in that case the space/nbsp but if we support such a 
thing, we need a better specification; there are probably more space 
related chars that needs treatment then


-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-15 19:18                   ` Hans Hagen
@ 2008-04-15 19:54                     ` Olivier Guéry
  2008-04-16  0:40                     ` Arthur Reutenauer
  1 sibling, 0 replies; 37+ messages in thread
From: Olivier Guéry @ 2008-04-15 19:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Apr 15, 2008 at 9:18 PM, Hans Hagen <pragma@wxs.nl> 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 mater what
>  > is in front of this punctuations (space, nbsp or nothing) just make
>  > them nbsp with the right spacing !
>
>  it's no problem to add avariant that treats nospace, space, nbsp as
>  equel, and removes in that case the space/nbsp but if we support such a
>  thing, we need a better specification; there are probably more space
>  related chars that needs treatment then

Great to hear.
Sorry but I don't understand well your last sentence : « there are
probably more space
related chars that needs treatment then ».
You want to know if there's other rules related to spaces in french typography ?
One of the most complicated for me is the « — » because the nbsp is a
« espace justifiante insécable » — don't know how to say this in
English — when we use it as parentheses, a regular nbps for dialog :
— Hello,
— Hello, how are you ?
and sometime… nothing. So I think we have to deal with this « by hand ».

Bus I'm sure about the rules for « : », « ; », « ? »,  « ! », "«" and
"»". And if I remember well, in Latex the space is 0.16667, not 0.25.

If you want, I can contact french people who know the rules, on a
typography mailing list.

Thank's for trying to solve the french strange behaviours.
Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-15 19:18                   ` Hans Hagen
  2008-04-15 19:54                     ` Olivier Guéry
@ 2008-04-16  0:40                     ` Arthur Reutenauer
  2008-04-16  8:50                       ` Hans Hagen
  1 sibling, 1 reply; 37+ messages in thread
From: Arthur Reutenauer @ 2008-04-16  0:40 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

>                                                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 much Unicode-compliantly as
possible; and there are some particular typographic conventions on top
of that, for each language.  It's easy to come up with a simple scheme
to support both, and I've already outlined it on a different
mailing-list (http://tug.org/pipermail/xetex/2008-February/008529.html).
The problem is to decide how much of the users' old typing habits we
want to take in account (and, Olivier, another message by me in the same
thread addresses the exact same issues you were raising a few days ago:
http://tug.org/pipermail/xetex/2008-February/008533.html).

  I can discuss that with you at BachoTeX, Hans.  It's best done around
a beer or two, anyway ;-)

	Arthur
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-16  0:40                     ` Arthur Reutenauer
@ 2008-04-16  8:50                       ` Hans Hagen
  2008-04-16 10:19                         ` Olivier Guéry
  0 siblings, 1 reply; 37+ messages in thread
From: Hans Hagen @ 2008-04-16  8:50 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

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
> Unicode, and we should handle them as much Unicode-compliantly as
> possible; and there are some particular typographic conventions on top
> of that, for each language.  It's easy to come up with a simple scheme
> to support both, and I've already outlined it on a different
> mailing-list (http://tug.org/pipermail/xetex/2008-February/008529.html).
> The problem is to decide how much of the users' old typing habits we

this is indeed an important point ... we don't want to cripple default 
behaviour by that (we already have -- --- and such)

the problem with all these automatisms is that it then becomes 
impossible to do something verbatim, i.e bypass those mechamisms

> want to take in account (and, Olivier, another message by me in the same
> thread addresses the exact same issues you were raising a few days ago:
> http://tug.org/pipermail/xetex/2008-February/008533.html).


>   I can discuss that with you at BachoTeX, Hans.  It's best done around
> a beer or two, anyway ;-)

sure, enough beer at bachotek anyway ...

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-16  8:50                       ` Hans Hagen
@ 2008-04-16 10:19                         ` Olivier Guéry
  2008-04-16 12:46                           ` Peter Münster
  0 siblings, 1 reply; 37+ messages in thread
From: Olivier Guéry @ 2008-04-16 10:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Apr 16, 2008 at 10:50 AM, Hans Hagen <pragma@wxs.nl> 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
>  >
>  >   There's not much to it, actually.  There are some space characters in
>  > Unicode, and we should handle them as much Unicode-compliantly as
>  > possible; and there are some particular typographic conventions on top
>  > of that, for each language.  It's easy to come up with a simple scheme
>  > to support both, and I've already outlined it on a different
>  > mailing-list (http://tug.org/pipermail/xetex/2008-February/008529.html).
>  > The problem is to decide how much of the users' old typing habits we
>
>  this is indeed an important point ... we don't want to cripple default
>  behaviour by that (we already have -- --- and such)

The spaces before « ; » and others are not the same habits than « -- »
and « --- ». « -- » is TeX specific, the spaces no, it's just a french
habit.

>  the problem with all these automatisms is that it then becomes
>  impossible to do something verbatim, i.e bypass those mechamisms

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.

(For sure questions like always indenting the paragraphs are more
complex since modern typography sometime don't put them).

>  >   I can discuss that with you at BachoTeX, Hans.  It's best done around
>  > a beer or two, anyway ;-)
>
>  sure, enough beer at bachotek anyway ...

If it can be solve with a beer ;o)

Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
Olivier nemolivier@gmail.com http://nemolivier.blogspot.com
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-16 10:19                         ` Olivier Guéry
@ 2008-04-16 12:46                           ` Peter Münster
  2008-04-16 14:20                             ` Hans Hagen
  0 siblings, 1 reply; 37+ messages in thread
From: Peter Münster @ 2008-04-16 12:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 "\setcharacterspacing[reset]", but it does not work:
ERROR: Missing number, treated as zero.

Until a bug-fix, you can use "\doresetattribute{spacing}".

I use for example
    \setuptyping[style=\doresetattribute{spacing}\tt]
    \setuptype[style=\doresetattribute{spacing}\tt]
at some places.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-04-16 12:46                           ` Peter Münster
@ 2008-04-16 14:20                             ` Hans Hagen
  0 siblings, 0 replies; 37+ messages in thread
From: Hans Hagen @ 2008-04-16 14:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.
> 
> There is already "\setcharacterspacing[reset]", but it does not work:
> ERROR: Missing number, treated as zero.
> 
> Until a bug-fix, you can use "\doresetattribute{spacing}".
> 
> I use for example
>     \setuptyping[style=\doresetattribute{spacing}\tt]
>     \setuptype[style=\doresetattribute{spacing}\tt]
> at some places.

i didn't know that this was broken .. fixed

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-07-04 14:23 ` Idris Samawi Hamid ادريس سماوي حامد
  2008-07-04 15:01   ` Olivier
@ 2008-07-04 20:39   ` Hans Hagen
  1 sibling, 0 replies; 37+ messages in thread
From: Hans Hagen @ 2008-07-04 20:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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


-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-07-04 17:38     ` Idris Samawi Hamid ادريس سماوي حامد
@ 2008-07-04 20:34       ` Hans Hagen
  0 siblings, 0 replies; 37+ messages in thread
From: Hans Hagen @ 2008-07-04 20:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Fri, 04 Jul 2008 09:01:13 -0600, Olivier <billet@eurecom.fr> 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 are cases where it is hard
>> to decide (automatically, because it means going down to the grammatical
>> level) if a tie has to be added or not. Therefore the end user always
>> have to choose the right thing to do: in one case, he has to add ties
>> when needed, in the suggested case he has to remove them. It seems to me
>> that the original problem is transformed into another dual one.
>> (Of course, this might prove useful if there are less exceptions in the
>> end, but I'm a bit sceptical.)
> 
> Thus, it should be a completely configurable by the user, then the user  
> can manage the exceptions. Based on my experience, it would save time to  
> have the option of a general framework -- and deal with the 10%+/- of  
> exceptions, than to have to enter every tie manually, and then proofread  
> to make sure you got the 90%+/- right.
> 
> I'm sure we could come up with a reasonable, flexible framework for this...

this kind of functionality is not that hard to implement (there is 
already some of it) and it will be under user control of course

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-07-04 15:01   ` Olivier
@ 2008-07-04 17:38     ` Idris Samawi Hamid ادريس سماوي حامد
  2008-07-04 20:34       ` Hans Hagen
  0 siblings, 1 reply; 37+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2008-07-04 17:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 04 Jul 2008 09:01:13 -0600, Olivier <billet@eurecom.fr> 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 are cases where it is hard
> to decide (automatically, because it means going down to the grammatical
> level) if a tie has to be added or not. Therefore the end user always
> have to choose the right thing to do: in one case, he has to add ties
> when needed, in the suggested case he has to remove them. It seems to me
> that the original problem is transformed into another dual one.
> (Of course, this might prove useful if there are less exceptions in the
> end, but I'm a bit sceptical.)

Thus, it should be a completely configurable by the user, then the user  
can manage the exceptions. Based on my experience, it would save time to  
have the option of a general framework -- and deal with the 10%+/- of  
exceptions, than to have to enter every tie manually, and then proofread  
to make sure you got the 90%+/- right.

I'm sure we could come up with a reasonable, flexible framework for this...

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-07-04 14:23 ` Idris Samawi Hamid ادريس سماوي حامد
@ 2008-07-04 15:01   ` Olivier
  2008-07-04 17:38     ` Idris Samawi Hamid ادريس سماوي حامد
  2008-07-04 20:39   ` Hans Hagen
  1 sibling, 1 reply; 37+ messages in thread
From: Olivier @ 2008-07-04 15:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Quoting  "Idris Samawi Hamid ?????????? ?????????? ????????" :
> -- was ishamid@colostate.edu on Jul 04, 2008 at 08:23:19AM --

> On Fri, 04 Jul 2008 04:54:26 -0600, Marcin Borkowski  
> <mbork@atos.wmid.amu.edu.pl> 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 answer in that
> > thread since I delete old mails:( ).
> >
> > BTW, I guess such a feature might be also useful for other purposes.
> 
> 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 are cases where it is hard
to decide (automatically, because it means going down to the grammatical
level) if a tie has to be added or not. Therefore the end user always
have to choose the right thing to do: in one case, he has to add ties
when needed, in the suggested case he has to remove them. It seems to me
that the original problem is transformed into another dual one. 
(Of course, this might prove useful if there are less exceptions in the
end, but I'm a bit sceptical.)

Olivier

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
  2008-07-04 10:54 Marcin Borkowski
@ 2008-07-04 14:23 ` Idris Samawi Hamid ادريس سماوي حامد
  2008-07-04 15:01   ` Olivier
  2008-07-04 20:39   ` Hans Hagen
  0 siblings, 2 replies; 37+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2008-07-04 14:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Marcin,

On Fri, 04 Jul 2008 04:54:26 -0600, Marcin Borkowski  
<mbork@atos.wmid.amu.edu.pl> 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 answer in that
> thread since I delete old mails:( ).
>
> BTW, I guess such a feature might be also useful for other purposes.

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:

a~propos
Dr.~[A-Z]
[1--9]~CE % historical dates
[1--9]~{\sc CE}

This issue is analogous to hyphenation: one could have rules for each  
language etc.

I guess this is a mkiv issue, not a luatex issue per se.

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: luatex feature question/request
@ 2008-07-04 10:54 Marcin Borkowski
  2008-07-04 14:23 ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 37+ messages in thread
From: Marcin Borkowski @ 2008-07-04 10:54 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

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 also useful for other purposes.

Anyway, I didn't read the ConTeXt list lately, but I'll soon start using
it on a more regular basis, so expect many newbie questions...

Thanks in advance:)

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

People can be divided into three groups: those who can count and those
who can't.
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2008-07-04 20:39 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-04  5:09 luatex feature question/request Marcin Borkowski
2008-04-04  7:50 ` Hans Hagen
2008-04-04  8:33   ` Taco Hoekwater
2008-04-04  8:38     ` luigi scarso
2008-04-04  8:52       ` Taco Hoekwater
2008-04-04  8:58         ` Olivier Guéry
2008-04-04  9:08           ` Hans Hagen
2008-04-04 11:02             ` Olivier Guéry
2008-04-04 11:15               ` Wolfgang Schuster
2008-04-04 12:26                 ` Olivier Guéry
2008-04-04 12:55                   ` Peter Münster
2008-04-04 13:15                     ` Olivier Guéry
2008-04-04 15:15                       ` Peter Münster
2008-04-04 20:23                         ` Olivier Guéry
2008-04-04 12:26               ` Hans Hagen
2008-04-04 13:09                 ` Olivier Guéry
2008-04-15 19:18                   ` Hans Hagen
2008-04-15 19:54                     ` Olivier Guéry
2008-04-16  0:40                     ` Arthur Reutenauer
2008-04-16  8:50                       ` Hans Hagen
2008-04-16 10:19                         ` Olivier Guéry
2008-04-16 12:46                           ` Peter Münster
2008-04-16 14:20                             ` Hans Hagen
2008-04-04 10:16           ` Peter Münster
2008-04-04  9:19         ` luigi scarso
2008-04-04 19:26         ` Peter Münster
2008-04-04 19:48           ` Aditya Mahajan
2008-04-04 20:03             ` Peter Münster
2008-04-04 20:07             ` Hans Hagen
2008-04-04 20:20           ` Taco Hoekwater
2008-04-04  9:57   ` Marcin Borkowski
2008-07-04 10:54 Marcin Borkowski
2008-07-04 14:23 ` Idris Samawi Hamid ادريس سماوي حامد
2008-07-04 15:01   ` Olivier
2008-07-04 17:38     ` Idris Samawi Hamid ادريس سماوي حامد
2008-07-04 20:34       ` Hans Hagen
2008-07-04 20:39   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).