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: upload
Date: Wed, 30 Mar 2022 12:02:04 +0200 [thread overview]
Message-ID: <0416E3AA-65DF-4F05-AC22-F955B8C9C9F6@gmail.com> (raw)
In-Reply-To: <p129rrp1-46on-3828-7oq2-84oqs0sn9811@hzvpu.rqh>
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 <ntg-context@ntg.nl> wrote:
>
> On Tue, 29 Mar 2022, Mikael Sundqvist via ntg-context wrote:
>
>> On Tue, Mar 29, 2022 at 6:37 AM Otared Kavian <otared@gmail.com> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2022-03-30 10:02 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-25 10:01 upload Hans Hagen via ntg-context
2022-03-28 21:22 ` upload Otared Kavian via ntg-context
2022-03-28 21:54 ` upload Mikael Sundqvist via ntg-context
2022-03-29 4:37 ` upload Otared Kavian via ntg-context
2022-03-29 14:10 ` upload Mikael Sundqvist via ntg-context
2022-03-29 16:08 ` upload Aditya Mahajan via ntg-context
2022-03-30 10:02 ` Otared Kavian via ntg-context [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-11 21:02 upload Hans Hagen via ntg-context
2022-12-21 16:20 upload Hans Hagen via ntg-context
2022-12-21 21:15 ` upload Pablo Rodriguez via ntg-context
2022-12-09 16:41 upload Hans Hagen via ntg-context
2022-10-21 19:23 upload Hans Hagen via ntg-context
2022-07-06 20:10 upload Hans Hagen via ntg-context
2022-07-06 20:38 ` upload Mikael Sundqvist via ntg-context
2022-07-07 1:15 ` upload Max Chernoff via ntg-context
2022-07-07 8:27 ` upload Hans Hagen via ntg-context
2022-07-08 7:40 ` upload Max Chernoff via ntg-context
2022-07-08 14:20 ` upload Hans Hagen via ntg-context
2022-07-07 20:48 ` upload Aditya Mahajan via ntg-context
2022-07-07 21:16 ` upload Hans Hagen via ntg-context
2022-07-08 22:34 ` upload Otared Kavian via ntg-context
2022-07-08 22:40 ` upload Otared Kavian via ntg-context
2022-07-09 7:39 ` upload Hans Hagen via ntg-context
2022-07-09 6:40 ` upload Hans Hagen via ntg-context
2022-05-09 15:41 upload Hans Hagen via ntg-context
2022-05-09 15:54 ` upload mf via ntg-context
2022-05-09 16:16 ` upload Hans Hagen via ntg-context
2022-05-09 16:39 ` upload Alexandre Christe via ntg-context
2022-05-09 16:16 ` upload Alexandre Christe via ntg-context
2022-05-09 16:36 ` upload Mikael Sundqvist via ntg-context
2022-05-10 5:10 ` upload śrīrāma via ntg-context
2022-05-11 12:48 ` upload śrīrāma via ntg-context
2022-05-11 15:46 ` upload Zhichu Chen via ntg-context
2022-05-11 17:00 ` upload Hans Hagen via ntg-context
2021-12-30 18:14 upload Hans Hagen via ntg-context
[not found] <mailman.320.1640390435.1172.ntg-context@ntg.nl>
2021-12-25 9:09 ` upload Jeong Dal via ntg-context
2021-12-25 10:57 ` upload Hans Hagen via ntg-context
2021-12-24 18:45 upload Hans Hagen via ntg-context
2021-12-24 22:08 ` upload Jairo A. del Rio via ntg-context
2021-12-24 23:39 ` upload Rik Kabel via ntg-context
2021-12-24 23:54 ` upload Hans Hagen via ntg-context
2021-12-25 9:19 ` upload Marco Patzer via ntg-context
2021-12-25 10:55 ` upload Hans Hagen via ntg-context
2021-12-25 11:22 ` upload Marco Patzer via ntg-context
2021-12-25 11:44 ` upload Hans Hagen via ntg-context
2021-12-25 12:18 ` upload Marco Patzer via ntg-context
2021-12-03 14:29 upload Hans Hagen via ntg-context
2021-12-06 4:41 ` upload Jairo A. del Rio via ntg-context
2021-11-24 14:29 upload Hans Hagen via ntg-context
2021-11-26 10:06 ` upload Alain Delmotte via ntg-context
2021-11-26 10:44 ` upload Hans Hagen via ntg-context
2021-10-21 18:04 upload Hans Hagen via ntg-context
2021-10-21 19:13 ` upload Pablo Rodriguez via ntg-context
2021-10-22 7:55 ` upload Hans Hagen via ntg-context
2021-10-21 20:31 ` upload Mikael Sundqvist via ntg-context
2021-10-22 7:22 ` upload Hans Hagen via ntg-context
2021-10-23 8:10 ` upload Mikael Sundqvist via ntg-context
2021-10-22 15:50 ` upload Michal Vlasák via ntg-context
2021-10-22 16:51 ` upload Pablo Rodriguez via ntg-context
2021-10-23 0:40 ` upload Hans Hagen via ntg-context
2021-10-18 21:17 upload Hans Hagen via ntg-context
2021-10-19 6:43 ` upload Axel Kielhorn via ntg-context
2021-10-20 7:29 ` upload Hans Hagen via ntg-context
2021-10-19 16:03 ` upload Pablo Rodriguez via ntg-context
2020-11-23 17:55 upload Hans Hagen
2020-11-23 18:28 ` upload Pablo Rodriguez
2020-11-23 18:29 ` upload Christian Prim
2020-11-23 19:21 ` upload Otared Kavian
2020-11-23 19:27 ` upload Hans Hagen
2020-11-23 19:24 ` upload Hans Hagen
2020-11-17 11:55 upload Hans Hagen
2020-11-17 13:57 ` upload Pablo Rodriguez
2020-11-17 14:15 ` upload Hans Hagen
2020-11-18 20:29 ` upload Pablo Rodriguez
2020-11-18 22:57 ` upload Hans Hagen
2020-11-17 15:26 ` upload Willi Egger
2020-07-27 14:42 upload Hans Hagen
2020-07-28 8:58 ` upload Fabrice Couvreur
2020-07-28 11:28 ` upload Hans Hagen
2020-02-11 16:00 upload Hans Hagen
2020-02-11 16:18 ` upload Floris van Manen
2020-02-11 19:07 ` upload Hans Hagen
2020-02-11 21:09 ` upload Richard Mahoney | Indica et Buddhica
2020-02-13 10:28 ` upload mf
2020-02-13 12:57 ` upload Hans Hagen
2020-02-17 9:39 ` upload mf
2013-03-05 18:18 upload Hans Hagen
2013-03-05 19:45 ` upload Thomas A. Schmitz
2012-07-04 8:56 upload Hans Hagen
2012-07-04 10:40 ` upload Hongwen Qiu
2012-07-04 11:29 ` upload Hans Hagen
2012-07-04 16:02 ` upload Philipp Gesang
2012-06-22 9:37 upload Hans Hagen
2012-06-22 10:10 ` upload Marco
2012-06-22 11:24 ` upload Hans Hagen
2012-06-22 12:19 ` upload Marco
2012-06-19 20:40 upload Hans Hagen
2012-06-20 3:28 ` upload Hongwen Qiu
2012-06-20 14:20 ` upload Hans Hagen
2006-04-07 8:22 upload Hans Hagen
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=0416E3AA-65DF-4F05-AC22-F955B8C9C9F6@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).