ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: A few questions about aligned maths
Date: Mon, 19 Jan 2009 09:52:27 -0500 (EST)	[thread overview]
Message-ID: <alpine.LNX.2.00.0901190947160.4250@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <7a884c7c0901172056o728ed92q896102df2bf26709@mail.gmail.com>

This can be corrected by changing the \vbox in the definition of 
\startmathlines to \vtop. This can be made configurable by adding a 
location key. Here is a complete example

\unprotect
\def\startmathlines
{\def\stop@math{$}
\def\NC{}
\def\NR{\def\NC{\cr}}
% Hack for number. Should be done by measuring the width of the number
\scratchdimen\dimexpr\displaywidth-4em \relax
\vbox \bgroup
\halign\bgroup
\hbox to \scratchdimen
{\hfil \strut
$\mathsurround\zeropoint\displaystyle{}## \stop@math
\hfil}%
\crcr
\hfilneg}

\def\stopmathlines
{\hfilneg
\crcr
\egroup
\egroup}
\protect

Once I understand the new experimental code, I will start playing around 
with aligned math support.

Aditya

On Sat, 17 Jan 2009, Dave wrote:

> Is there any progress on this?  I notice it is not yet in the core.  I'm in
> need of an AMSL split-like environment but the above doesn't work entirely
> as expected.  Below is an example.
> Any ideas?
> Thanks, Dave
>
> \placeformula
> \startformula \startalign
>  \NC \sigma_{L_s}^2
>      \NC= E\left\{ \eps_L^2 \right\} \NR
>  \NC \NC= \startmathlines
>       \NC E\left\{ \left( \frac{1}{L_{\ref}^2(\nu)}
>
> \Re{\eps_{\pth}+\eps_{\off}}\,\cos\left(\phi(\nu)\right) +
>
> \Im{\eps_{\pth}+\eps_{\off}}\,\sin\left(\phi(\nu)\right)
>                    \right)^2 \right\} - \NR
>       \NC E\left\{ \frac{2}{L_{\ref}^2(\nu)} \,
> \frac{L_{\pth}(\nu)}{L_{\ref}(\nu)}
>                    \left(
>                      \Re{\eps_{\pth} +
> \eps_{\off}}\,\cos\left(\phi(\nu)\right) +
>                      \Im{\eps_{\pth} +
> \eps_{\off}}\,\sin\left(\phi(\nu)\right)
>                    \right) \NR
>                \NC \left(
>                      \Re{\eps_{\ref} +
> \eps_{\off}}\,\cos\left(\phi(\nu)\right) +
>                      \Im{\eps_{\ref} +
> \eps_{\off}}\,\sin\left(\phi(\nu)\right) +
>                    \right)
>                    \right\} + \NR
>       \NC E\left\{ \frac{1}{L_{\ref}^2(\nu)} \,
> \frac{L_{\pth}^2(\nu)}{L_{\ref}^2(\nu)}
>                    \left(
>                      \Re{\eps_{\ref} +
> \eps_{\off}}\,\cos\left(\phi(\nu)\right) +
>                      \Im{\eps_{\ref} +
> \eps_{\off}}\,\sin\left(\phi(\nu)\right)
>                    \right)^2 \right\} \NR
>            \stopmathlines \NR
>  \NC \NC= \frac{1}{L_{\ref}^2} \, \left( \sigma_{\pth}^2 +
>           \left(\frac{L_{\pth}}{L_{\ref}} - 1\right)^2 \sigma_{\off}^2 +
>           \left(\frac{L_{\pth}}{L_{\ref}}\right)^2 \sigma_{\ref}^2 \right)
>           \NR[eq:SpcTransVarC2]
> \stopalign \stopformula
>
>
> On Mon, Mar 24, 2008 at 7:17 AM, Aditya Mahajan <adityam@umich.edu> wrote:
>
>> On Mon, 24 Mar 2008, Hans Hagen wrote:
>>
>>> Morgan Brassel wrote:
>>>
>>>> Sorry that I can't help you with the implementation, Aditya... I just
>> want
>>>> to confirm that your new macro perfectly fits my needs. I hope it will
>>>> make it into the core, it really is useful!
>>>
>>> once aditya is confident that it makes sense and works as expected it
>>> will probably end up in the core, but as usual i'll wait till he sends
>>> me an updated core file
>>
>> It will be a while before I am able to get all the bells and whistles
>> (take care of where the formula number is to be placed, and how how the
>> formula is to be aligned).
>>
>> 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://tex.aanhet.net
>> archive  : https://foundry.supelec.fr/projects/contextrev/
>> 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2009-01-19 14:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13  1:13 Morgan Brassel
2008-03-13 12:23 ` Aditya Mahajan
2008-03-13 18:16   ` Morgan Brassel
2008-03-13 23:48     ` Aditya Mahajan
2008-03-14  0:53       ` Morgan Brassel
2008-03-14  7:13       ` Wolfgang Schuster
2008-03-14 20:45         ` Aditya Mahajan
2008-03-23  5:31 ` Aditya Mahajan
2008-03-24  0:00   ` Morgan Brassel
2008-03-24 10:19     ` Hans Hagen
2008-03-24 12:17       ` Aditya Mahajan
2009-01-18  4:56         ` Dave
2009-01-19 14:52           ` Aditya Mahajan [this message]

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=alpine.LNX.2.00.0901190947160.4250@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).