Sistema in cui ogni equazione e’ numerata

  • Creatore
    Topic
  • #5710
    Up
    0
    Down
    ::


    Ciao a tutti,
    leggendo un forum in francese mi sono imbattuta in questo post cui nessuno sa dare la risposta.
    In pratica si vuole scrivere qualcosa del tipo

    A = grande parentesi graffa che racchiude un sistema di cinque equazioni ciascuna numerata.

    Ora io so scrivere con eqnarray e varianti (align…) un insieme di n equazioni numerate, ma non so come mettere la parentesi graffa che li contenga, oppure so scrivere tutto correttamente con array o cases e \left\{ ma non so mettere i numeri a ciascuna equazione. Mi e’ venuta l’idea di guardare come il pacchetto amsmath definisce l’ambiente align e farne uno analogo che pero’ accetta un parametro e aggiunge una parentesi graffa prima delle equazioni ma non saprei come fare.

    Ora, non e’ un problema urgente per me ma… qualcuno ha un’idea? (non ci dormo la notte 😯 )

    Grazie

Visualizzazione 1 filone di risposte
  • Autore
    Risposte
    • #5711
      Up
      0
      Down
      ::


      Ho postato lo stesso probelma sul NG francese ed ecco la risposta (a naso doveva essere facile ma proprio non ne uscivo da sola):

      pacchetto cases con i suoi environnement numcases e subnumcases

      Dal file .sty:

      % C A S E S . S T Y ver 2.5 May 2002
      %
      % Copyright (C) 1993,1994,1995,2000,2002 by Donald Arseneau
      % asnd@triumf.ca
      % These macros may be freely transmitted, reproduced, or modified
      % provided that this notice is left intact. Sub-equation numbering
      % is based on subeqn.sty by Stephen Gildea; most of the rest is based
      % on LaTeX’s \eqnarray by Leslie Lamport and the LaTeX3 team.
      %
      % This provides a LaTeX environment {numcases} to produce multi-case
      % equations with a separate equation number for each case. There is
      % also {subnumcases} which numbers each case with the overall equation
      % number plus a letter [8a, 8b, etc.]. The syntax is
      %
      % \begin{numcases}{left_side}
      % case_1 & explanation_1 \\
      % case_2 & explanation_2 \\
      % …
      % case_n & explanation_n
      % \end{numcases}
      %
      % Each case is a math formula, and each explanation is a piece of lr mode
      % text (which may contain math mode in \(…\) or $…$). The explanations
      % are optional. Equation numbers are inserted automatically, just as for
      % the eqnarray environment. In particular, the \nonumber command suppresses
      % an equation number and the \label command allows reference to a particular
      % case. In a subnumcases environment, a \label in the left_side of the
      % equation gives the overall equation number, without any letter.
      %
      % To use this package,
      % include “\usepackage{cases}” after \documentclass. You may also
      % specify “\usepackage[subnum]{cases}” to force *all* numcases
      % environments to be treated as subnumcases.
      %
      % Question: Is there a {numcases*} environment for unnumbered cases?
      % Answer: There is a {cases} environment in AMS-LaTeX, but it is just as
      % convenient to stick with the canonical LaTeX array:
      % \[ left side = \left\{ PROTECTED1 \right. \]
      %
      % Speaking of AMS-math, they use an entirely different system of equation
      % numbering, and this package uses ordinary LaTeX numbering.
      %
      % – – – – –
      % A simple example is:
      % \begin{numcases}{|x|=}
      % x, & for $x \geq 0$\\
      % -x, & for $x < 0$ % \end{numcases} % % Giving: % / x for x > 0 (1)
      % |x| = < - % \ -x for x < 0 (2) % % - - - - - % % Another example is calculating the square root of $c+id$. First compute % \begin{subnumcases}{\label{w} w\equiv} % 0 & $c = d = 0$\label{wzero}\\ % \sqrt{|c|}\,\sqrt{\frac{1 + \sqrt{1+(d/c)^2}}{2}} & $|c| \geq |d|$ \\ % \sqrt{|d|}\,\sqrt{\frac{|c/d| + \sqrt{1+(c/d)^2}}{2}} & $|c| < |d|$ % \end{subnumcases} % Then, using $w$ from eq.~(\ref{w}), the square root is % \begin{subnumcases}{\sqrt{c+id}=} % 0 & $w=0$ (case \ref{wzero})\\ % w+i\frac{d}{2w} & $w \neq 0$, $c \geq 0$ \\ % \frac{|d|}{2w} + iw & $w \neq 0$, $c < 0$, $d \geq 0$ \\ % \frac{|d|}{2w} - iw & $w \neq 0$, $c < 0$, $d < 0$ % \end{subnumcases}

    • #5712
      Up
      0
      Down
      ::


      Ottima segnalazione! Anche io avevo bisogno di questi ambienti ma non l’avevo ancora scoperto.

Visualizzazione 1 filone di risposte
  • Devi essere connesso per rispondere a questo topic.

Go to top