ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "302302" <302302@centrum.cz>
To: "ntg-context" <ntg-context@ntg.nl>
Subject: Re: Math equation with indentation
Date: Wed, 14 May 2008 13:29:17 +0200	[thread overview]
Message-ID: <200805141329.10108@centrum.cz> (raw)

>On Tue, 13 May 2008, 302302 wrote:
>
>> Hi,
>> I need to use a multieqaution in this form ( http://img233.imageshack.us/img233/2372/eqsx3.png ). I am mostly interested in the right brace and >the indentation after the "subject to". I tried to use mathmatrix but without success. Can you help me with it?>
>
>I am using nested matrices, but this is one case which will be best solved 
>by something equivalent for gathered and aligned. It has been on my todo 
>list for a long time.
>
>Here is a solution using nested matrices, where I use \noalign to fake 
>correct spacing after the first line (and changed the \cdots in the last 
>condition to \dots).
>
>\definemathmatrix[rightbrace][left={\left.},right={\,\right\}},n=1,align=left]
>
>\starttext
>
>\placeformula[+] \startformula
>\startrightbrace
>   \NC \min \{c_1 x_1 + c_2 x_2 + \cdots + c_n x_n \} \NR
>       \noalign{\vskip 0.2em}
>   \NC \text{subject to} \NR
>   \NC \quad
>       \startmathmatrix[n=9,align={middle,middle,middle,
>         middle,middle,middle,right,middle,middle},
>         distance=0.3em]
>         \NC a_{11} x_1 \NC + \NC a_{12} x_2 \NC +
>         \NC \cdots \NC + \NC a_{1n} x_n \NC = \NC b_1 \NR
>         \NC a_{21} x_1 \NC + \NC a_{22} x_2 \NC +
>         \NC \cdots \NC + \NC a_{2n} x_n \NC = \NC b_2 \NR
>         \NC            \NC   \NC  \vdots    \NC
>         \NC        \NC   \NC            \NC   \NC \vdots \NR
>         \NC a_{m1} x_1 \NC + \NC a_{m2} x_2 \NC +
>         \NC \cdots \NC + \NC a_{mn} x_n \NC = \NC b_m \NR
>         \NC            \NC   \NC            \NC
>         \NC        \NC
>         \NC \llap{x_1,x_2,\dots,x_n} \NC \ge \NC 0.
>       \stopmathmatrix \NR
>   \stoprightbrace
>\stopformula
>
>\stoptext
>
>
>Aditya

Great, thanks a lot! And is there any way how to get in the first line \min_{x \in X} with the parameter exactly below the "min"? Because in this  solution the parameter {x \in X} is on the right bottom, like in a line.

Czenek

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


             reply	other threads:[~2008-05-14 11:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14 11:29 302302 [this message]
2008-05-14 14:45 ` Aditya Mahajan
  -- strict thread matches above, loose matches on Subject: below --
2008-05-13 20:57 302302
2008-05-13 23:44 ` Aditya Mahajan

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=200805141329.10108@centrum.cz \
    --to=302302@centrum.cz \
    --cc=ntg-context@ntg.nl \
    /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).