ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: \autoinsertedspace fails
Date: Thu, 5 Jan 2023 08:38:56 +0100	[thread overview]
Message-ID: <a6e775e8-c33f-cd60-a1ee-759640b81cd4@xs4all.nl> (raw)
In-Reply-To: <d44c1452-3fd7-f1ac-bf45-2550642c2a5d@rik.users.panix.com>

On 1/5/2023 4:21 AM, Rik Kabel via ntg-context wrote:
> 
> On 2023-01-04 18:45, Hans Hagen wrote:
>> On 1/4/2023 11:10 PM, Rik Kabel via ntg-context wrote:
>>> No change with the latest (2023.01.04).
>>>
>>> Is this a problem with what I am doing, or a bug?
>> well, it's new and not thtat tested ... we need to specify it
>>
>> This\optionalspace fails unexpectedly with autoinsertedspace.\par
>> This\optionalspace \emph{fails unexpectedly} with autoinsertedspace.\par
>>
>> there can be more variants, like do we want to remove preceding spaces?
>>
>> we already have:
>>
>> This\optionalspace, fails unexpectedly with autoinsertedspace.\par
>> This\optionalspace, \emph{fails unexpectedly} with autoinsertedspace.\par
>> This\optionalspace fails unexpectedly with autoinsertedspace.\par
>> This\optionalspace \emph{fails unexpectedly} with autoinsertedspace.\par
> 
> 
> \optionalspace works correctly (that is, as I want it to) for all of my 
> use cases under both MkIV and LMTX. Is there any reason that this should 
> not be used in user documents?

depends ... it checks punctuation

> I do wonder what characters are considered "punctuation" for the purpose 
> of suppressing the next space. The standard six sentence termination 
> characters (?!.:;,) are honored, and so are many others (quotation 
> marks, including guillemot, square and curly braces, and parens). But 
> sentence opening characters (¿¡) are as well. Vertical bars (|¦) and 
> basic mathematical characters (+-=*) are not treated as punctuation. 
> Where (in the source or manuals) are these to be found?

we use unicode properties (collected in char-def.lua)

> As far as removing leading spaces, I do not see that it is necessary, 
> but it may help create more readable sources.
> 
> Thank you for the fix.

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2023-01-05  7:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30  0:12 Rik Kabel via ntg-context
2023-01-04 22:10 ` Rik Kabel via ntg-context
2023-01-04 23:45   ` Hans Hagen via ntg-context
2023-01-05  3:21     ` Rik Kabel via ntg-context
2023-01-05  7:38       ` Hans Hagen via ntg-context [this message]
2023-01-05  9:35       ` Hans Hagen via ntg-context
2023-01-06  2:05         ` Rik Kabel via ntg-context
2023-01-06  7:53           ` Hans Hagen via ntg-context

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=a6e775e8-c33f-cd60-a1ee-759640b81cd4@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.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).