ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Otared Kavian <otared@gmail.com>
Subject: Re: autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)
Date: Thu, 26 Jan 2023 22:52:23 +0100	[thread overview]
Message-ID: <7C8A3A2B-2A77-4A6F-801E-B715BE83B600@gmail.com> (raw)
In-Reply-To: <9b1c62d7-833b-f81e-0f49-88df0e84ea6f@freedom.nl>


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

Hi Hans and Mikael,

Thank you both for your attention to my reply and the clarification and hints regarding the comman \colonequals and 
	\setupmathematics[autospacing=yes]

Indeed the command \colonequals give the precise expected alignment for the combination glyph « := ». Befors changing the combination « := » to \columnequals in my documents, I am wondering whether one could add a small lua code in order to make an automatic replacement at run time. Actually, since I don’t know of any other instance in which the combination « := » is used to mean something else, would it not be reasonnable to make « := » synonym to \colonequals?

I played a little bit with 
	\setupmathematics[autospacing=yes]
and it seems to me that without this command one gets automatic spacing in math mode, while with the above command the spacing obeys what has been inserted in the source. Is this behaviour intended, or is there a mismatch between 
	\setupmathematics[autospacing=yes]
and
	\setupmathematics[autospacing=no]

Best regards: Otared


> On 26 Jan 2023, at 10:33, Hans Hagen via ntg-context <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> wrote:
> 
> On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote:
>> On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
>> <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> wrote:
>>> 
>>> Hi,
>>> 
>>> Thanks Hraban for the information and the link to the article by Hans and Mikael about the math fonts in Lucida.
>>> 
>>> I very much appreciated that article: one sees how the handling of almost impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a great thank you to Hans and Mikael for all this work!
>>> 
>>> Regarding the details of vertical alignment in math, I wonder whether the column « : » in front of the equal sign « = », in the combination « := » (used to define for instance a new variable) should be alos centered around the math axis, as explained in the article. For instance in the following example
>>> 
>>> \setupbodyfont[lucidaot,12pt]
>>> \starttext
>>> \startformula
>>> f(x) := -(u|x) := - \langle u, x \rangle
>>> \stopformula
>>> \stopformula
>>> \startformula
>>> f : A \longrightarrow B
>>> \stopformula
>>> \stoptext
>>> 
>>> it seems to me that the lower dot (or square…) in the semicolumn of the first formula (in front of the equal sign) is lower than in the second formula.
>>> 
>>> Best regards: Otared
>> Thank you for the kind words, Otared,
>> Regarding the colons (and other symbols with "dots"), I would say it
>> is still not optimal in Lucida (and difficult to make it "consistent",
>> there are too many symbols that are at the moment different). But in
>> your example you can use \colonequals and \colon if you prefer. They
>> are centered around the math axis.
>> Best, Mikael
>> \setupbodyfont[lucidaot,12pt]
>> \starttext
>> \startformula
>> f(x) := -(u|x) \colonequals - \langle u, x \rangle
>> \stopformula
>> \startformula
>> f : A \longrightarrow B \breakhere
>> f \colon A \longrightarrow B
>> \stopformula
>> \startformula
>> \mathaxisbelow := \colonequals : \colon
>> \stopformula
>> \stoptext
> There is a (experimental as we played with it and then got distracted) feature that makes some symbols adapt to spacing in the input.
> 
> \starttext
> 
>    \setupmathematics[autospacing=yes]
> 
>    \setupmathematics[collapsing=2]
> 
>    \im{A:B} and \im{A : B}\par
>    \im{A:=B} and \im{A := B}\par
>    \im{A\colonequals B} and \im{A {\colonequals} B}\par
> 
> \stoptext
> 
> the second line is not yet ok as collapsing the := (old feature) comes at the wrong time when we do autospacing (something Mikasl and I now need to discuss and test)
> 
> This autospacing is part of some larger effort, for instance we can also auto handle fences and so. All this relates to minimizing the input and make it a bit more natural. Think (1,2) vb (1, 2) where we - due to the many more classes that we have - want spacing to be right.
> 
> All will be revealed in the upcoming releases and the upcoming 3145 page math manual.
> 
> Hans
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | www.pragma-pod.nl <http://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 <mailto:ntg-context@ntg.nl> / https://www.ntg.nl/mailman/listinfo/ntg-context <https://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
> wiki     : https://contextgarden.net <https://contextgarden.net/>
> ___________________________________________________________________________________

Otared Kavian
e-mail: otared@gmail.com <mailto:otared@gmail.com>
Phone: +33 6 88 26 70 95





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

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

___________________________________________________________________________________
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-26 21:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23  8:39 Fwd: Lucida-1.901 (2023-01-21) available Henning Hraban Ramm via ntg-context
2023-01-24 10:40 ` Otared Kavian via ntg-context
2023-01-25 17:24   ` Mikael Sundqvist via ntg-context
2023-01-26  9:33     ` Hans Hagen via ntg-context
2023-01-26 21:52       ` Otared Kavian via ntg-context [this message]
2023-01-26 22:23         ` autospacing and colonequals (was Lucida-1.901 (2023-01-21) available) Hans Hagen via ntg-context
2023-01-27 17:26           ` Otared Kavian via ntg-context
2023-01-27 17:31             ` Hans Hagen via ntg-context
2023-01-27 17:58               ` Aditya Mahajan via ntg-context
2023-01-27 19:56                 ` 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=7C8A3A2B-2A77-4A6F-801E-B715BE83B600@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=otared@gmail.com \
    /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).