On Thu, 10 Oct 2024, Otared Kavian wrote:
Hi Mikael,
My personal experience with numbered equations gathered with a big left curly brace (assuming that the numbers are put to the right of formulas) is that it is very useful (or indispensable…) to be able to number each equation and be able to refer to them. For instance, when one writes a partial differential equation, usually there are boundary conditions, initial conditions and such, which may take 3, 4 or 5 lines of equations (some authors may even have more than that, but I personally avoid it…). It is useful to be able to refer to each of these equations, either by numebring them as subformulas, or numebering them sequentially. It is true that in this case, that is when each line has a number, usually one does not number the whole system of equations gathered by the big left brace. The optimal solution would be to have the option to number each line, or to number them as subformulas.
For instance in the following minimal example (based on one of your answers some time ago), the reference to « eq:Robin » does not work and the numbers of each line of the PDE problem are not correctly aligned to the right.
Reference to eq:Robin doesn't work because of the following reason: You define
\define[1]\eqref{(\in[eq:#1])}
and then use \eqref[eq:Robin] which is then translated to (\in[eq:eq:Robin]). It may be better to use: \definereferenceformat [eqref] [left=(, right=), style=normal] Regarding \startcases number not being to the right edge of the textarea: there is no good solution here. Keep in mind that \startcases is an "inner level" construct, so it is not aware of the width of the outer environment. It is possible to circumvent it on a code-logic level, but we first need to decide how should the following behave: \startformula x(t) = \startcases \NC 0, \NC t < 0 \NR \NC 1, \NC t \ge 0 \NR[+] \stopcases \quad\text{and}\quad y(t) = \startcases \NC 0, \NC t < 0 \NR[+] \NC 1, \NC t \ge 0 \NR \stopcases \stopformula The point is, that \stopcases can be followed by additional text, so placing the number at the right edge may interfere with other things. In the example that you sent, the solution presented by Mikael (\startalign[fences=cases]) will work. Aditya