Hi, Last night I uploaded a new lmtx: - fix in new strut handling - zint support improved - some more math font tweaks (mikael will enlighten *) - math alignment spacing nornmalized (mikael will explain *) - new simplealignment environmet (mikael will document *) We're now playing a bit more with combining graphics and math (educational usage) Hans * when asked ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Thank you for the new upload and the improvements you mention about the handling of math stuff. Thanks also to Mikael for the follow up of these matters. I noticed that in math mode the command \cal does not work anymore and one has to use \mathcal. However in almost all of my documents I use Lucida Bright OT, and in some occasions I replace its calligraphic letters by the slots from Asana Math with the following definitions: \definefallbackfamily[myfont][math][Asana Math] [range={uppercasescript,lowercasescript}] % lucida font \definefontfamily[myfont][serif][Lucida Bright OT] \definefontfamily[myfont][math][LucidaBrightMathOT] \definefontfamily[myfont][sans][LucidaSansOT] \definefontfamily[myfont][mono][LucidaSansTypewriterOT] \setupbodyfont[myfont,9pt] It seems that with the changes made recently the above definitions must be modified in order to have Asana Math show up. So, I am asking for help from Mikael in this regard… Also, it would be nice to have a few explanations about the new stuff in math alignments. Best regards: Otared K.
On 25 Mar 2022, at 11:01, Hans Hagen via ntg-context
wrote: Hi,
Last night I uploaded a new lmtx:
- fix in new strut handling - zint support improved - some more math font tweaks (mikael will enlighten *) - math alignment spacing nornmalized (mikael will explain *) - new simplealignment environmet (mikael will document *)
We're now playing a bit more with combining graphics and math (educational usage)
Hans
* when asked
----------------------------------------------------------------- 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Mon, Mar 28, 2022 at 11:23 PM Otared Kavian
Hi Hans,
Thank you for the new upload and the improvements you mention about the handling of math stuff. Thanks also to Mikael for the follow up of these matters.
I noticed that in math mode the command \cal does not work anymore and one has to use \mathcal. However in almost all of my documents I use Lucida Bright OT, and in some occasions I replace its calligraphic letters by the slots from Asana Math with the following definitions:
\definefallbackfamily[myfont][math][Asana Math] [range={uppercasescript,lowercasescript}]
% lucida font \definefontfamily[myfont][serif][Lucida Bright OT] \definefontfamily[myfont][math][LucidaBrightMathOT] \definefontfamily[myfont][sans][LucidaSansOT] \definefontfamily[myfont][mono][LucidaSansTypewriterOT]
\setupbodyfont[myfont,9pt]
It seems that with the changes made recently the above definitions must be modified in order to have Asana Math show up.
So, I am asking for help from Mikael in this regard…
Hi Otared, At the moment I don't know how one can use the fallback system with calligraphic/script fonts. Let me explain in a few sentences what we changed. Now we have \mathcal and \mathscr. If the font has both a chancery alphabet and a roundhand alphabet, the goodie file is coded so that \mathcal points to chancery and \mathscr to roundhand. This is the case for Lucida. So, maybe you could try to do \setupbodyfont[lucidadk] and then try \mathscr out. Other fonts that have both variants are stixtwo and xits. The rest have only either chancery style or roundhand style, and there you will get what it has. About \cal I don't know.
Also, it would be nice to have a few explanations about the new stuff in math alignments.
I think the new math alignments are still work in progress. One thing that happens will probably go unnoticed, and that is the spacing. Hans is playing a lot with the new atoms, and right now he is playing(?) with construction atoms, ghosts and fences. There is one new type of alignments, called simplealignments. We can use them for example to collect some equations with a brace (and give the collection one number). /Mikael \setupbodyfont[lucidadk] \definemathsimplealign[collecteqequations][ left={\startmathfenced[sesac]}, right=\stopmathfenced, align={1:right,2:left}, ] \starttext %\showmakeup[mathglue] ${\mathcal ABC}$ and ${\mathscr ABC}$ \placeformula \startformula \startcollecteqequations \NC x \NC = r\sin\theta\cos\phi\NR \NC y \NC = r\sin\theta\sin\phi \NR \NC z \NC = r\cos\theta \NR \stopcollecteqequations \stopformula \stoptext
Hi Mikael, Thanks for your explanation and the example you sent about \definemathsimplealign (I didn’t get immediately that « sesac » in the command \startmathfenced[sesac] means « cases » in reverse or mirrored… I guess this is a wise and humourous choice by Hans :-) ). Regarding \startcases, it seems that it is still not possible to number each equation, but I may be overlooking something. I’ll try a few examples and will let you know, as well as Hans. Best regards: Otared
On 28 Mar 2022, at 23:54, Mikael Sundqvist
wrote: On Mon, Mar 28, 2022 at 11:23 PM Otared Kavian
wrote: Hi Hans,
Thank you for the new upload and the improvements you mention about the handling of math stuff. Thanks also to Mikael for the follow up of these matters.
I noticed that in math mode the command \cal does not work anymore and one has to use \mathcal. However in almost all of my documents I use Lucida Bright OT, and in some occasions I replace its calligraphic letters by the slots from Asana Math with the following definitions:
\definefallbackfamily[myfont][math][Asana Math] [range={uppercasescript,lowercasescript}]
% lucida font \definefontfamily[myfont][serif][Lucida Bright OT] \definefontfamily[myfont][math][LucidaBrightMathOT] \definefontfamily[myfont][sans][LucidaSansOT] \definefontfamily[myfont][mono][LucidaSansTypewriterOT]
\setupbodyfont[myfont,9pt]
It seems that with the changes made recently the above definitions must be modified in order to have Asana Math show up.
So, I am asking for help from Mikael in this regard…
Hi Otared,
At the moment I don't know how one can use the fallback system with calligraphic/script fonts. Let me explain in a few sentences what we changed. Now we have \mathcal and \mathscr. If the font has both a chancery alphabet and a roundhand alphabet, the goodie file is coded so that \mathcal points to chancery and \mathscr to roundhand. This is the case for Lucida. So, maybe you could try to do \setupbodyfont[lucidadk] and then try \mathscr out. Other fonts that have both variants are stixtwo and xits. The rest have only either chancery style or roundhand style, and there you will get what it has. About \cal I don't know.
Also, it would be nice to have a few explanations about the new stuff in math alignments.
I think the new math alignments are still work in progress. One thing that happens will probably go unnoticed, and that is the spacing. Hans is playing a lot with the new atoms, and right now he is playing(?) with construction atoms, ghosts and fences. There is one new type of alignments, called simplealignments. We can use them for example to collect some equations with a brace (and give the collection one number).
/Mikael
\setupbodyfont[lucidadk]
\definemathsimplealign[collecteqequations][ left={\startmathfenced[sesac]}, right=\stopmathfenced, align={1:right,2:left}, ]
\starttext %\showmakeup[mathglue] ${\mathcal ABC}$ and ${\mathscr ABC}$
\placeformula \startformula \startcollecteqequations \NC x \NC = r\sin\theta\cos\phi\NR \NC y \NC = r\sin\theta\sin\phi \NR \NC z \NC = r\cos\theta \NR \stopcollecteqequations \stopformula
\stoptext <220328-5.pdf>
On Tue, Mar 29, 2022 at 6:37 AM Otared Kavian
Hi Mikael,
Hi Otared,
Thanks for your explanation and the example you sent about \definemathsimplealign (I didn’t get immediately that « sesac » in the command \startmathfenced[sesac] means « cases » in reverse or mirrored… I guess this is a wise and humourous choice by Hans :-) ).
I guess so too :)
Regarding \startcases, it seems that it is still not possible to number each equation, but I may be overlooking something. I’ll try a few examples and will let you know, as well as Hans.
Hm, but a cases environment does not provide several formulas. This is just one formula: \startformula |x|= \startcases \NC x \NC x>0\NR \NC 0 \NC x=0\NR \NC -x \NC x<0\NR \stopcases \stopformula and as such should have (at most) one equation number, right? Only Hans knows if it is (easily) doable to add the possibility to add numbers to each three lines. By the way, thanks for testing and commenting! /Mikael
On Tue, 29 Mar 2022, Mikael Sundqvist via ntg-context wrote:
On Tue, Mar 29, 2022 at 6:37 AM Otared Kavian
wrote: Hi Mikael,
Hi Otared,
Thanks for your explanation and the example you sent about \definemathsimplealign (I didn’t get immediately that « sesac » in the command \startmathfenced[sesac] means « cases » in reverse or mirrored… I guess this is a wise and humourous choice by Hans :-) ).
I guess so too :)
Regarding \startcases, it seems that it is still not possible to number each equation, but I may be overlooking something. I’ll try a few examples and will let you know, as well as Hans.
Hm, but a cases environment does not provide several formulas. This is just one formula:
\startformula |x|= \startcases \NC x \NC x>0\NR \NC 0 \NC x=0\NR \NC -x \NC x<0\NR \stopcases \stopformula
and as such should have (at most) one equation number, right?
However, some sub-disciplines like to number each case (for example, if you want to refer to one of them in the future).
Only Hans knows if it is (easily) doable to add the possibility to add numbers to each three lines.
In the old implementation, this was tricky (the equation without the equation number should be centered, and the equation number should be flush right). But I think that this should be possible with the new low-level box alignment macros. Aditya
Hi Aditya and Mikael, Indeed in some situations it is useful to number each equation appearing in formulas grouped with \startcases, and one can construct a structure allowing this, as in the example below which is not satisfactory. I am sure Hans can find a better solution… Here is a working example: % begin math-cases-numbered.tex \definemathmatrix[alignedcases] [align={1:right,2:left,3:left}, distance=3pt, left={\left\{}, right={\right.}, style=\displaystyle] \definereferenceformat[informula] [left=(,right=),text=] \def\eqref#1{\informula[eq:#1]} \starttext Using \type{\startmathfenced} and \type{\startalign} we can number each equation, but the left brace is too far from the formula: \startplaceformula \startformula \startmathfenced[cases] \startalign[n=3,align={1:right,2:left,3:left}] \NC \partial_{tt} u - \Delta u + q(x) u \NC = 0 \NC \quad\text{in }\; (0,T)\times\Omega \NR[+] \NC u \NC = 0 \NC \quad\text{on }\; [0,T]\times\partial\Omega \NR[eq:Dirichlet] \NC u(0,x) \NC = u_{0} \NC \quad\text{in }\; \Omega \NR[+] \NC \partial_{t}u(0,x) \NC = v_{0} \NC \quad\text{in }\; \Omega \NR[+] \stopalign \stopmathfenced \stopformula \stopplaceformula In some situations it is useful to number each equation, for example when we want to say: Indeed we could study the above wave equation with Neumann boundary conditions, that is when \eqref{Dirichlet} is replaced with \startplaceformula[eq:Neumann] \startformula {\partial u \over \partial {\bi n} } = 0 \quad \text{on }\; [0,T]\times\partial\Omega. \stopformula \stopplaceformula Using \type{\startalignedcases} we cannot number each equation\dots \startplaceformula \startformula \startalignedcases \NC \partial_{tt} u - \Delta u + q(x) u \NC = 0 \NC \quad\text{in }\; (0,T)\times\Omega \NR \NC u \NC = 0 \NC \quad\text{in }\; [0,T]\times\partial\Omega \NR \NC u(0,x) \NC = u_{0} \NC \quad\text{in }\; \Omega \NR \NC \partial_{t}u(0,x) \NC = v_{0} \NC \quad\text{in }\; \Omega \NR \stopalignedcases \stopformula \stopplaceformula \stoptext % end math-cases-numbered.tex Best regards: Otared
On 29 Mar 2022, at 18:08, Aditya Mahajan via ntg-context
wrote: On Tue, 29 Mar 2022, Mikael Sundqvist via ntg-context wrote:
On Tue, Mar 29, 2022 at 6:37 AM Otared Kavian
wrote: Hi Mikael,
Hi Otared,
Thanks for your explanation and the example you sent about \definemathsimplealign (I didn’t get immediately that « sesac » in the command \startmathfenced[sesac] means « cases » in reverse or mirrored… I guess this is a wise and humourous choice by Hans :-) ).
I guess so too :)
Regarding \startcases, it seems that it is still not possible to number each equation, but I may be overlooking something. I’ll try a few examples and will let you know, as well as Hans.
Hm, but a cases environment does not provide several formulas. This is just one formula:
\startformula |x|= \startcases \NC x \NC x>0\NR \NC 0 \NC x=0\NR \NC -x \NC x<0\NR \stopcases \stopformula
and as such should have (at most) one equation number, right?
However, some sub-disciplines like to number each case (for example, if you want to refer to one of them in the future).
Only Hans knows if it is (easily) doable to add the possibility to add numbers to each three lines.
In the old implementation, this was tricky (the equation without the equation number should be centered, and the equation number should be flush right). But I think that this should be possible with the new low-level box alignment macros.
Aditya___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Mikael Sundqvist
-
Otared Kavian