Peter Münster schrieb am 07.06.2024 um 13:31:
On Thu, May 30 2024, Peter Münster wrote:

\mainlanguage[fr]
\setcharacterspacing[frenchpunctuation]
\starttext
bla \quotation{OK} bla\\
bla «OK» bla
\startquotation
   Not Ok: a space is missing
\stopquotation
\stoptext

It seems, that this workaround solves the problem:
\setupquotation[before={\setcharacterspacing[reset]}]


The quotation environment doesn't rely on the characterspacing mechanism to add the spaces before and the after the quotes but uses language dependent skips.

The example below shows how it works and where it fails when you use characterspacing. Resetting spacing (and probably other settings like charcterkerning etc.) when the quotes are added as you noticed fixes the problem.

%%%% begin example
\starttext

\dontleavehmode
\hbox{«\hspace[fr][quotation]}%
xxx%
\hbox{\hspace[fr][quotation]»}

\setcharacterspacing[frenchpunctuation]

\dontleavehmode
\hbox{«\hspace[fr][quotation]}%
xxx%
\hbox{\hspace[fr][quotation]»}

\dontleavehmode
\hbox{\expand\everyresettypesetting\relax «\hspace[fr][quotation]}%
xxx%
\hbox{\expand\everyresettypesetting\relax \hspace[fr][quotation]»}

\stoptext
%%%% end example

What do you think about it? Is this the right way to do it?

I would use the symstyle key as hook to disable charcterspacing for the quotes in the environment.

%%%% begin example
\mainlanguage[fr]

\setcharacterspacing[frenchpunctuation]

\setupquotation[symstyle=\resetcharacterspacing]

\starttext

«xxx»

\startquotation xxx\stopquotation

\stoptext
%%%% end example

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to