ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: missing space with French quotation
Date: Fri, 7 Jun 2024 14:18:19 +0200	[thread overview]
Message-ID: <dc7a5e95-3344-c6a0-fe65-ca2368eefa61@gmail.com> (raw)
In-Reply-To: <87bk4ddm60.fsf@a16n.net>

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	other threads:[~2024-06-07 12:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 15:34 [NTG-context] " Peter Münster
2024-05-30 17:21 ` [NTG-context] " Rik Kabel
2024-05-30 20:33   ` Wolfgang Schuster
2024-05-30 21:29     ` Rik Kabel
2024-06-04 18:31 ` Peter Münster
2024-06-07 11:31 ` Peter Münster
2024-06-07 12:18   ` Wolfgang Schuster [this message]
2024-06-07 14:21     ` Alan Braslau via ntg-context
2024-06-07 17:40       ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc7a5e95-3344-c6a0-fe65-ca2368eefa61@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).