ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Adding whitespace equivalent to a -ve sign
@ 2008-02-11 17:51 Dave
  2008-02-11 18:38 ` Aditya Mahajan
  0 siblings, 1 reply; 2+ messages in thread
From: Dave @ 2008-02-11 17:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

I am trying to line up some equations on a page and I'd like to insert
some whitespace that has the same width as a -ve sign in an equation.
An example would be trying to ensure the cosine and sine and on the
first and second rows (second column) in the matrix below:

  \startpmatrix
    % Row 1
    \NC - \cos \theta_{\text{el}} \, \sin \theta_{\text{az}}
    \NC \cos \theta_{\text{az}}
    \NC \sin \theta_{\text{el}} \, \sin \theta_{\text{el}} \NR
    % Row 2
    \NC - \cos \theta_{\text{el}} \, \cos \theta_{\text{az}}
    \NC - \sin \theta_{\text{az}}
    \NC \sin \theta_{\text{el}} \, \cos \theta_{\text{el}} \NR
    % Row 3
    \NC - \sin \theta_{\text{el}}
    \NC 0
    \NC \cos \theta_{\text{el}} \NR
   \stoppmatrix

Any ideas?

Thanks,
Graham
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Adding whitespace equivalent to a -ve sign
  2008-02-11 17:51 Adding whitespace equivalent to a -ve sign Dave
@ 2008-02-11 18:38 ` Aditya Mahajan
  0 siblings, 0 replies; 2+ messages in thread
From: Aditya Mahajan @ 2008-02-11 18:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 11 Feb 2008, Dave wrote:

> Hi all,
>
> I am trying to line up some equations on a page and I'd like to insert
> some whitespace that has the same width as a -ve sign in an equation.
> An example would be trying to ensure the cosine and sine and on the
> first and second rows (second column) in the matrix below:
>
>  \startpmatrix
>    % Row 1
>    \NC - \cos \theta_{\text{el}} \, \sin \theta_{\text{az}}
>    \NC \cos \theta_{\text{az}}

change this to

\NC \hphantom{-} \cos \theta ....

>    \NC \sin \theta_{\text{el}} \, \sin \theta_{\text{el}} \NR
>    % Row 2
>    \NC - \cos \theta_{\text{el}} \, \cos \theta_{\text{az}}
>    \NC - \sin \theta_{\text{az}}
>    \NC \sin \theta_{\text{el}} \, \cos \theta_{\text{el}} \NR
>    % Row 3
>    \NC - \sin \theta_{\text{el}}
>    \NC 0
>    \NC \cos \theta_{\text{el}} \NR
>   \stoppmatrix
>
> Any ideas?

Normally you have to be a bit careful with minus as it is both a uniary 
and binary operator. To get the space equal to a uniary operator 
\hphantom{-} should be ok, to get space equal to binary operator, you can 
try \hphantom{{}-} or \hphantom{{}-{}}

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-11 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-11 17:51 Adding whitespace equivalent to a -ve sign Dave
2008-02-11 18:38 ` Aditya Mahajan

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).