French punctuation: improvement needed
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
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
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
participants (3)
-
Hans Hagen
-
Renaud AUBIN
-
Taco Hoekwater