ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Reconciling unicode-math with LaTeX2e mathematics
@ 2015-12-03  2:16 Maggyero
  2015-12-03 12:33 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Maggyero @ 2015-12-03  2:16 UTC (permalink / raw)
  To: ntg-context


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

Hans Hagen wrote:
> you need to be more explicit about the problems you encounter (minimal
examples for instance)

To be more precise (please see the enclosed P.D.F. file), I would like the
same font possibilities in ConTeXt math mode as shown in the following
table from Will Robertson's talk at 41 min 40 s for LaTeX unicode-math
package:

https://youtu.be/FW9Cwh9sj5w?t=2500

In both LaTeX and ConTeXt, we have two kinds of fonts:
— a text font: multi-letter words;
— a math font: single letter words.

In math mode, using LaTeX, text fonts can use both
— text spacing: $\textit{abc ffi}$ gives abc ffi;
— math spacing: $\mathit{abc ffi}$ gives abcffi.

In math mode, using LaTeX, math fonts can use only math spacing: $abc ffi$
gives abcffi.
($abc ffi$ is equivalent to $\symit{abc ffi}$—\symxx commands were
introduced in the 2015 update of the unicode-math package by Will
Robertson, allowing upright, slanted, bold, etc. math fonts with \symup,
\symsl \symbf, etc., respectively.)

However, in math mode, using ConTeXt, text fonts can use only TEXT spacing
(no MATH spacing commands): $\text{\it abc ffi}$ gives abc ffi. So this is
the FEATURE that needs to be added. I suggest that you implement a new set
of commands called \textxx for this (text fonts with MATH spacing in math
mode—please see the enclosed P.D.F. file).

As far as math fonts are concerned using ConTeXt in math mode, it's okay:
$\it{abc ffi}$ gives abcffi. But you should note that in the source of
ConTeXt you (Hans) introduced \mathit (and \mathup & \mathtf, \mathsl,
\mathbf, etc.) as an equivalent of \it (\tf, \sl, \bf, etc., respectively)
for "A.M.S. LaTeX compatibility", though in A.M.S. LaTeX the \mathxx
commands are not MATH fonts but TEXT fonts with math spacing (as pointed
out by Will Robertson in the very first seconds from 41 min 40 s of his
talk in the link above) so it not compatible (but that's fine since the
name \mathxx in A.M.S. LaTeX was not very well chosen in the first place
but thereafter kept for backward compatibility, so that in ConTeXt we can
keep it used for MATH fonts instead and introduce \textxx for TEXT fonts
with math spacing, as suggested in the previous paragraph).

Please see the enclosed P.D.F. file that sums everything up to understand
visually what I mean with the missing feature I request (adding new \textxx
commands for text fonts with MATH spacing in math mode), and let me know
what you think.


Maggyero

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

[-- Attachment #2: math_mode_fonts.pdf --]
[-- Type: application/pdf, Size: 23844 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Reconciling unicode-math with LaTeX2e mathematics
  2015-12-03  2:16 Reconciling unicode-math with LaTeX2e mathematics Maggyero
@ 2015-12-03 12:33 ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2015-12-03 12:33 UTC (permalink / raw)
  To: ntg-context

On 12/3/2015 3:16 AM, Maggyero wrote:

> In both LaTeX and ConTeXt, we have two kinds of fonts:
> — a text font: multi-letter words;
> — a math font: single letter words.
>
> In math mode, using LaTeX, text fonts can use both
> — text spacing: $\textit{abc ffi}$ gives abc ffi;
> — math spacing: $\mathit{abc ffi}$ gives abcffi.
>
 > ...
> okay: $\it{abc ffi}$ gives abcffi. But you should note that in the
> source of ConTeXt you (Hans) introduced \mathit (and \mathup & \mathtf,
> \mathsl, \mathbf, etc.) as an equivalent of \it (\tf, \sl, \bf, etc.,

It's a bit different .. traditional tex has 8 bit fonts. Also, in 
traditional tex math families were implemented using text fonts while in 
opentype (unicode) math the alphabets come from the math fonts (with 
math properties). And, as there is some basic ligaturing built in the 
traditional math code path it will deal with ligatures in such a font. 
you can consider that an intentional side effect of using text fonts.

The context unicode math implementation is different (and quite likely 
rather different from latex too, if only because it already was done 
many years ago). Also, the implementation is quite ok (and actually 
pretty advanced) so changing something in the-latex-way is no option (in 
whatever way it is done, which i must admit i don't know). Most context 
math evolved over time and the mentioned commands were introduced 
already in mkii when aditya extended some code.

Anyway, as we have \mathtext (aka \text) we can also have an extra 
command \mathword which nils the spacing because that is actually what 
you ask for: space not being a space (math spacing is something else, it 
would enclose each character with math spacing which contradicts with 
ligatures).

I'll send you some code to play with,

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Reconciling unicode-math with LaTeX2e mathematics
@ 2015-12-03  2:22 Maggyero
  0 siblings, 0 replies; 5+ messages in thread
From: Maggyero @ 2015-12-03  2:22 UTC (permalink / raw)
  To: ntg-context


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

Hans Hagen wrote:
> you need to be more explicit about the problems you encounter (minimal
examples for instance)

To be more precise (please see the enclosed P.D.F. file), I would like the
same font possibilities in ConTeXt math mode as shown in the following
table from Will Robertson's talk at 41 min 40 s for LaTeX unicode-math
package:

https://youtu.be/FW9Cwh9sj5w?t=2500

In both LaTeX and ConTeXt, we have two kinds of fonts:
— a text font: multi-letter words;
— a math font: single letter words.

In math mode, using LaTeX, text fonts can use both
— text spacing: $\textit{abc ffi}$ gives abc ffi;
— math spacing: $\mathit{abc ffi}$ gives abcffi.

In math mode, using LaTeX, math fonts can use only math spacing: $abc ffi$
gives abcffi.
($abc ffi$ is equivalent to $\symit{abc ffi}$—\symxx commands were
introduced in the 2015 update of the unicode-math package by Will
Robertson, allowing upright, slanted, bold, etc. math fonts with \symup,
\symsl \symbf, etc., respectively.)

However, in math mode, using ConTeXt, text fonts can use only TEXT spacing
(no MATH spacing commands): $\text{\it abc ffi}$ gives abc ffi. So this is
the FEATURE that needs to be added. I suggest that you implement a new set
of commands called \textxx for this (text fonts with MATH spacing in math
mode—please see the enclosed P.D.F. file).

As far as math fonts are concerned using ConTeXt in math mode, it's okay:
$\it{abc ffi}$ gives abcffi. But you should note that in the source of
ConTeXt you (Hans) introduced \mathit (and \mathup & \mathtf, \mathsl,
\mathbf, etc.) as an equivalent of \it (\tf, \sl, \bf, etc., respectively)
for "A.M.S. LaTeX compatibility", though in A.M.S. LaTeX the \mathxx
commands are not MATH fonts but TEXT fonts with math spacing (as pointed
out by Will Robertson in the very first seconds from 41 min 40 s of his
talk in the link above) so it not compatible (but that's fine since the
name \mathxx in A.M.S. LaTeX was not very well chosen in the first place
but thereafter kept for backward compatibility, so that in ConTeXt we can
keep it used for MATH fonts instead and introduce \textxx for TEXT fonts
with math spacing, as suggested in the previous paragraph).

Please see the enclosed P.D.F. file that sums everything up to understand
visually what I mean with the missing feature I request (adding new \textxx
commands for text fonts with MATH spacing in math mode), and let me know
what you think.


Maggyero

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

[-- Attachment #2: math_mode_fonts.pdf --]
[-- Type: application/pdf, Size: 23844 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Reconciling unicode-math with LaTeX2e mathematics
  2015-11-30 17:20 Maggyero
@ 2015-11-30 17:44 ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2015-11-30 17:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/30/2015 6:20 PM, Maggyero wrote:
> Is there a plan to have in ConTeXt the same kind of math behavior that
> Will Robertson implemented in the last version of his unicode-math LaTeX
> package (\mathrm, \mathit, \mathbf, \symrm, \symit, \symbf, etc.)?
> Because ConTeXt currently has the same math/text spacing issues in math
> mode that the old unicode-math package had.

you need to be more explicit about the problems you encounter (minimal 
examples for instance)

the (unicode) math implementation of context has been around for many 
years now and the basic approach is unlikely to change

of course is something is wrong we fix it (given that it fits within the 
unicode / opentype possibilities)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Reconciling unicode-math with LaTeX2e mathematics
@ 2015-11-30 17:20 Maggyero
  2015-11-30 17:44 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Maggyero @ 2015-11-30 17:20 UTC (permalink / raw)
  To: ntg-context


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

Is there a plan to have in ConTeXt the same kind of math behavior that Will
Robertson implemented in the last version of his unicode-math LaTeX package
(\mathrm, \mathit, \mathbf, \symrm, \symit, \symbf, etc.)? Because ConTeXt
currently has the same math/text spacing issues in math mode that the old
unicode-math package had.

Will Roberston's talk (20 July 2015):

https://www.youtube.com/watch?v=FW9Cwh9sj5w

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

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

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-03 12:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03  2:16 Reconciling unicode-math with LaTeX2e mathematics Maggyero
2015-12-03 12:33 ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2015-12-03  2:22 Maggyero
2015-11-30 17:20 Maggyero
2015-11-30 17:44 ` Hans Hagen

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).