ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* French punctuation: improvement needed
@ 2006-04-05 11:08 Renaud AUBIN
  2006-04-05 11:30 ` Taco Hoekwater
  2006-04-05 11:52 ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Renaud AUBIN @ 2006-04-05 11:08 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 609 bytes --]


Hi all,

For my french document, I use:

\def\activateSomeCharacters{%
  \defineactivecharacter ! {\,\string!}%
  \defineactivecharacter ? {\,\string?}%
  \defineactivecharacter : {\,\string:}%
  \defineactivecharacter ; {\,\string;}}
\activateSomeCharacters
\appendtoks\activateSomeCharacters\to\everystarttext

in my environment, but there is a problem:

If the input is "test:", the result is correct but if the input is "test
:" (with a space between test and :) the output space between test and :
is too large (I assume a normal space + \,)
Is this possible to get this def smarter ?

Cheers,

Renaud


[-- Attachment #1.2: Type: text/html, Size: 1006 bytes --]

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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: French punctuation: improvement needed
  2006-04-05 11:08 French punctuation: improvement needed Renaud AUBIN
@ 2006-04-05 11:30 ` Taco Hoekwater
  2006-04-05 11:52 ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Taco Hoekwater @ 2006-04-05 11:30 UTC (permalink / raw)


Renaud AUBIN wrote:
> 
> Is this possible to get this def smarter ?

   \defineactivecharacter : {\removelastspace \,\string:}

Cheers, Taco

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

* Re: French punctuation: improvement needed
  2006-04-05 11:08 French punctuation: improvement needed Renaud AUBIN
  2006-04-05 11:30 ` Taco Hoekwater
@ 2006-04-05 11:52 ` Hans Hagen
  2006-04-05 14:35   ` Renaud AUBIN
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2006-04-05 11:52 UTC (permalink / raw)


Renaud AUBIN wrote:
>
> Hi all,
>
> For my french document, I use:
>
> \def\activateSomeCharacters{%
>   \defineactivecharacter ! {\,\string!}%
>   \defineactivecharacter ? {\,\string?}%
>   \defineactivecharacter : {\,\string:}%
>   \defineactivecharacter ; {\,\string;}}
> \activateSomeCharacters
> \appendtoks\activateSomeCharacters\to\everystarttext
>
> in my environment, but there is a problem:
>
> If the input is "test:", the result is correct but if the input is 
> "test :" (with a space between test and :) the output space between 
> test and : is too large (I assume a normal space + \,)
> Is this possible to get this def smarter ?
do you use \useencoding[ffr]? 

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

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

* Re: French punctuation: improvement needed
  2006-04-05 11:52 ` Hans Hagen
@ 2006-04-05 14:35   ` Renaud AUBIN
  2006-04-05 15:44     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Renaud AUBIN @ 2006-04-05 14:35 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 744 bytes --]

Yes, in my product I use:

\enableregime[il9]
\useencoding[ffr]
\mainlanguage[fr]

just before \startproduct

Taco's def works fine...

Renaud

>do you use \useencoding[ffr]? 
>
>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
>-----------------------------------------------------------------
>
>_______________________________________________
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
>  
>


[-- Attachment #1.2: Type: text/html, Size: 1415 bytes --]

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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: French punctuation: improvement needed
  2006-04-05 14:35   ` Renaud AUBIN
@ 2006-04-05 15:44     ` Hans Hagen
  2006-04-05 15:58       ` Renaud AUBIN
  2006-04-05 16:06       ` Renaud AUBIN
  0 siblings, 2 replies; 8+ messages in thread
From: Hans Hagen @ 2006-04-05 15:44 UTC (permalink / raw)


Renaud AUBIN wrote:
> Yes, in my product I use:
>
> \enableregime[il9]
> \useencoding[ffr]
> \mainlanguage[fr]
>
> just before \startproduct
>
> Taco's def works fine...
but why do you need defs at all 

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

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

* Re: French punctuation: improvement needed
  2006-04-05 15:44     ` Hans Hagen
@ 2006-04-05 15:58       ` Renaud AUBIN
  2006-04-05 17:57         ` Hans Hagen
  2006-04-05 16:06       ` Renaud AUBIN
  1 sibling, 1 reply; 8+ messages in thread
From: Renaud AUBIN @ 2006-04-05 15:58 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1174 bytes --]

Hans Hagen a écrit :

>but why do you need defs at all 
>
>Hans
>  
>
Because if I don't use this def, I don't obtain correct spacing (i.e. no
space between the word and { ;, :, !, ? } ) !

Considering this sample:

\setupoutput[pdftex]

\enableregime[il9]
\useencoding[ffr]
\mainlanguage[fr]

\starttext
Essai: est-ce que la ponctuation est correcte?

Essai : est-ce que la ponctuation est correcte?

Essai : est-ce que la ponctuation est correcte ?

Peut-être bien que oui ! Peut-être que non!
\stoptext

The output returns:

Essai: est-ce que la ponctuation est correcte?

Essai: est-ce que la ponctuation est correcte?

Essai: est-ce que la ponctuation est correcte?

Peut-être bien que oui! Peut-être que non!

...

Renaud

with:

TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

               texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
               texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
                   tex : pdfeTeX, 3.141592-1.30.6-2.2 (Web2C 7.5.5)
               context : ver: 2006.03.25 13:21
               cont-en : ver: 2006.03.25 13:21  fmt: 2006.4.4  mes: english



[-- Attachment #1.2: Type: text/html, Size: 2049 bytes --]

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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: French punctuation: improvement needed
  2006-04-05 15:44     ` Hans Hagen
  2006-04-05 15:58       ` Renaud AUBIN
@ 2006-04-05 16:06       ` Renaud AUBIN
  1 sibling, 0 replies; 8+ messages in thread
From: Renaud AUBIN @ 2006-04-05 16:06 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1195 bytes --]

I remember that french punctuation worked well in the past, then it
doesn't work anymore... At this time, I thought that my problem are due
to my document and correct the problem with the first def, then forget
and think about other problems...

See [NTG-context] French punctuation spacing not working anymore   
(2006.02.15)

Renaud

Hans Hagen a écrit :

>Renaud AUBIN wrote:
>  
>
>>Yes, in my product I use:
>>
>>\enableregime[il9]
>>\useencoding[ffr]
>>\mainlanguage[fr]
>>
>>just before \startproduct
>>
>>Taco's def works fine...
>>    
>>
>but why do you need defs at all 
>
>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
>-----------------------------------------------------------------
>
>_______________________________________________
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
>  
>


[-- Attachment #1.2: Type: text/html, Size: 1887 bytes --]

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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: French punctuation: improvement needed
  2006-04-05 15:58       ` Renaud AUBIN
@ 2006-04-05 17:57         ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2006-04-05 17:57 UTC (permalink / raw)


Renaud AUBIN wrote:
> Hans Hagen a écrit :
>> but why do you need defs at all 
>>
>> Hans
>>   
> Because if I don't use this def, I don't obtain correct spacing (i.e. 
> no space between the word and { ;, :, !, ? } ) !
>
> Considering this sample:
>
> \setupoutput[pdftex]
>
> \enableregime[il9]
> \useencoding[ffr]
> \mainlanguage[fr]
>
> \starttext
> Essai: est-ce que la ponctuation est correcte?
>
> Essai : est-ce que la ponctuation est correcte?
>
> Essai : est-ce que la ponctuation est correcte ?
>
> Peut-être bien que oui ! Peut-être que non!
> \stoptext
>
> The output returns:
>
> Essai: est-ce que la ponctuation est correcte?
>
> Essai: est-ce que la ponctuation est correcte?
>
> Essai: est-ce que la ponctuation est correcte?
>
> Peut-être bien que oui! Peut-être que non!
change this in enco-ffr: (\empty -> \currentmainlanguage) 

\startlanguagespecifics[\s!fr]
    \definetextmodediscretionary : {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{:}:}
    \definetextmodediscretionary ; {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{;};}
    \definetextmodediscretionary ? {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{?}?}
    \definetextmodediscretionary ! {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{!}!}
\stoplanguagespecifics

(btw, this feature will be replaces in due time by pdftex's pre/post character kerning features) 

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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

end of thread, other threads:[~2006-04-05 17:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-05 11:08 French punctuation: improvement needed Renaud AUBIN
2006-04-05 11:30 ` Taco Hoekwater
2006-04-05 11:52 ` Hans Hagen
2006-04-05 14:35   ` Renaud AUBIN
2006-04-05 15:44     ` Hans Hagen
2006-04-05 15:58       ` Renaud AUBIN
2006-04-05 17:57         ` Hans Hagen
2006-04-05 16:06       ` Renaud AUBIN

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