ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Math Alignment - start equation at left margin
@ 2009-11-29 23:45 Curiouslearn
  2009-11-30  7:40 ` Otared Kavian
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Curiouslearn @ 2009-11-29 23:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,
Can someone please help with the alignment of  the equation so that it
starts at left. I tried flushleft and other options (such as without
\NC \NR, with align=left etc.). None of them result in the equation
starting at the left margin. The equation is either placed in the
middle or is aligned to the right. I want it to start at the left.

Thanks.

\setuppapersize[letter][letter]

\starttext

\startformula\startalign[align={left}]
				\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
\stopalign\stopformula

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


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

* Re: Math Alignment - start equation at left margin
  2009-11-29 23:45 Math Alignment - start equation at left margin Curiouslearn
@ 2009-11-30  7:40 ` Otared Kavian
  2009-11-30  7:50 ` Otared Kavian
  2009-12-15 11:41 ` Aditya Mahajan
  2 siblings, 0 replies; 7+ messages in thread
From: Otared Kavian @ 2009-11-30  7:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2277 bytes --]

Hi,

Is this what you want to achieve:

%%%%%% begin
\starttext

From Aditya's \type{mathalign.pdf}, where he defines in fact a 
\type{\definemathalignment[flalign]}, 
(but I prefer \type{FLalign]…) one has

\definemathalignment[FLalign] [m=2, distance=5em plus 1 fil] %We need to set a default value for m

Curiouslearn'  input was:
\startformula
\startalign
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
\stopalign
\stopformula

\startformula
\startFLalign %% here you can add [m=2] or [m=3] if you need more columns
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC \NC \NR %% note twice \NC
\stopFLalign
\stopformula

\stoptext
%%%%%% end

Best regards: OK

On 30 nov. 2009, at 00:45, Curiouslearn wrote:

> Hi,
> Can someone please help with the alignment of  the equation so that it
> starts at left. I tried flushleft and other options (such as without
> \NC \NR, with align=left etc.). None of them result in the equation
> starting at the left margin. The equation is either placed in the
> middle or is aligned to the right. I want it to start at the left.
> 
> Thanks.
> 
> \setuppapersize[letter][letter]
> 
> \starttext
> 
> \startformula\startalign[align={left}]
> 				\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
> \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
> \stopalign\stopformula
> 
> \stoptext
> ___________________________________________________________________________________
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: Otared.Kavian@math.uvsq.fr




[-- Attachment #1.2: Type: text/html, Size: 4255 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

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

* Re: Math Alignment - start equation at left margin
  2009-11-29 23:45 Math Alignment - start equation at left margin Curiouslearn
  2009-11-30  7:40 ` Otared Kavian
@ 2009-11-30  7:50 ` Otared Kavian
  2009-11-30 23:54   ` Curiouslearn
  2009-12-15 11:41 ` Aditya Mahajan
  2 siblings, 1 reply; 7+ messages in thread
From: Otared Kavian @ 2009-11-30  7:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2357 bytes --]

Sorry for sending this again: I forgot a closing "}" in  \type{FLalign]…)}…

Hi,

Is this what you want to achieve:

%%%%%% begin
\starttext

From Aditya's \type{mathalign.pdf}, where he defines in fact a 
\type{\definemathalignment[flalign]}, 
(but I prefer \type{FLalign]…)} one has

\definemathalignment[FLalign] [m=2, distance=5em plus 1 fil] %We need to set a default value for m

Curiouslearn'  input was:
\startformula
\startalign
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
\stopalign
\stopformula

\startformula
\startFLalign %% here you can add [m=2] or [m=3] if you need more columns
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC \NC \NR %% note twice \NC
\stopFLalign
\stopformula

\stoptext
%%%%%% end

Best regards: OK

On 30 nov. 2009, at 00:45, Curiouslearn wrote:

> Hi,
> Can someone please help with the alignment of  the equation so that it
> starts at left. I tried flushleft and other options (such as without
> \NC \NR, with align=left etc.). None of them result in the equation
> starting at the left margin. The equation is either placed in the
> middle or is aligned to the right. I want it to start at the left.
> 
> Thanks.
> 
> \setuppapersize[letter][letter]
> 
> \starttext
> 
> \startformula\startalign[align={left}]
> 				\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
> \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
> \stopalign\stopformula
> 
> \stoptext
> ___________________________________________________________________________________
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: Otared.Kavian@math.uvsq.fr




[-- Attachment #1.2: Type: text/html, Size: 4367 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

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

* Re: Math Alignment - start equation at left margin
  2009-11-30  7:50 ` Otared Kavian
@ 2009-11-30 23:54   ` Curiouslearn
  0 siblings, 0 replies; 7+ messages in thread
From: Curiouslearn @ 2009-11-30 23:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Otared, thanks very much for bringing Aditya's article to my
attention. The method worked well.



On Mon, Nov 30, 2009 at 2:50 AM, Otared Kavian <otared@gmail.com> wrote:
> Sorry for sending this again: I forgot a closing "}" in  \type{FLalign]…)}…
> Hi,
> Is this what you want to achieve:
> %%%%%% begin
> \starttext
> From Aditya's \type{mathalign.pdf}, where he defines in fact a
> \type{\definemathalignment[flalign]},
> (but I prefer \type{FLalign]…)} one has
> \definemathalignment[FLalign] [m=2, distance=5em plus 1 fil] %We need to set
> a default value for m
> Curiouslearn'  input was:
> \startformula
> \startalign
> \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
> \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
> \stopalign
> \stopformula
> \startformula
> \startFLalign %% here you can add [m=2] or [m=3] if you need more columns
> \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
> \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC \NC \NR %% note twice \NC
> \stopFLalign
> \stopformula
> \stoptext
> %%%%%% end
> Best regards: OK
> On 30 nov. 2009, at 00:45, Curiouslearn wrote:
>
> Hi,
> Can someone please help with the alignment of  the equation so that it
> starts at left. I tried flushleft and other options (such as without
> \NC \NR, with align=left etc.). None of them result in the equation
> starting at the left margin. The equation is either placed in the
> middle or is aligned to the right. I want it to start at the left.
>
> Thanks.
>
> \setuppapersize[letter][letter]
>
> \starttext
>
> \startformula\startalign[align={left}]
> \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
> \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
> \stopalign\stopformula
>
> \stoptext
> ___________________________________________________________________________________
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
> %%%%%%%%%%%%%%%%%%
> Otared Kavian
> Département de Mathématiques
> Université de Versailles Saint-Quentin
> Bâtiment Fermat
> 45 aveue des Etats Unis
> 78035 Versailles cedex
> Téléphone: +33 1 39 25 46 42
> Secrétariat: +33 1 39 25 46 44
> Secrétariat: +33 1 39 25 46 46
> e-mail: Otared.Kavian@math.uvsq.fr
>
>
>
> ___________________________________________________________________________________
> 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  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Math Alignment - start equation at left margin
  2009-11-29 23:45 Math Alignment - start equation at left margin Curiouslearn
  2009-11-30  7:40 ` Otared Kavian
  2009-11-30  7:50 ` Otared Kavian
@ 2009-12-15 11:41 ` Aditya Mahajan
  2009-12-15 11:56   ` Hans Hagen
  2009-12-16  3:41   ` Curiouslearn
  2 siblings, 2 replies; 7+ messages in thread
From: Aditya Mahajan @ 2009-12-15 11:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 29 Nov 2009, Curiouslearn wrote:

> Hi,
> Can someone please help with the alignment of  the equation so that it
> starts at left. I tried flushleft and other options (such as without
> \NC \NR, with align=left etc.). None of them result in the equation
> starting at the left margin. The equation is either placed in the
> middle or is aligned to the right. I want it to start at the left.
>
> Thanks.
>
> \setuppapersize[letter][letter]
>
> \starttext
>
> \startformula\startalign[align={left}]
> 				\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
> \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
> \stopalign\stopformula
>
> \stoptext

The correct way to do this is

\setupformulas[align=flushleft]

\starttext
\startformula
   a = b
\stopformula
\stoptext

However, this does not work in MkIV due to a bug introduced in the 
splitting of mkii-mkiv files. math alignment works using commands

\def\startinnermath
   {\getvalue{\e!start\??fm\formulaparameter\c!align}}

\def\stopinnermath
   {\getvalue{\e!stop \??fm\formulaparameter\c!align}}

which are defined in math-ali.mkiv. However, strc-mat.mkiv redefines these 
to \empty, so the simple math alignment does not work anymore.

Hans: we need to either move these definitions from math-ali to strc-mat 
or remove

\let\startinnermath\empty
\let\stopinnermath \empty

from strc-mat.mkiv

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


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

* Re: Math Alignment - start equation at left margin
  2009-12-15 11:41 ` Aditya Mahajan
@ 2009-12-15 11:56   ` Hans Hagen
  2009-12-16  3:41   ` Curiouslearn
  1 sibling, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2009-12-15 11:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:

> Hans: we need to either move these definitions from math-ali to strc-mat 
> or remove
> 
> \let\startinnermath\empty
> \let\stopinnermath \empty
> 
> from strc-mat.mkiv

ok, removed

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Math Alignment - start equation at left margin
  2009-12-15 11:41 ` Aditya Mahajan
  2009-12-15 11:56   ` Hans Hagen
@ 2009-12-16  3:41   ` Curiouslearn
  1 sibling, 0 replies; 7+ messages in thread
From: Curiouslearn @ 2009-12-16  3:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I had tried using \setupformulas, but it did not work when I posted my
question. I suppose it was for the reason you mentioned. I will try it
again, once I have downloaded the latest beta.

Thanks.

On Tue, Dec 15, 2009 at 6:41 AM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Sun, 29 Nov 2009, Curiouslearn wrote:
>
>> Hi,
>> Can someone please help with the alignment of  the equation so that it
>> starts at left. I tried flushleft and other options (such as without
>> \NC \NR, with align=left etc.). None of them result in the equation
>> starting at the left margin. The equation is either placed in the
>> middle or is aligned to the right. I want it to start at the left.
>>
>> Thanks.
>>
>> \setuppapersize[letter][letter]
>>
>> \starttext
>>
>> \startformula\startalign[align={left}]
>>                                \NC\text{\bf Example: }
>>  \frac{d(4x^{2})}{dx} = 4
>> \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
>> \stopalign\stopformula
>>
>> \stoptext
>
> The correct way to do this is
>
> \setupformulas[align=flushleft]
>
> \starttext
> \startformula
>  a = b
> \stopformula
> \stoptext
>
> However, this does not work in MkIV due to a bug introduced in the splitting
> of mkii-mkiv files. math alignment works using commands
>
> \def\startinnermath
>  {\getvalue{\e!start\??fm\formulaparameter\c!align}}
>
> \def\stopinnermath
>  {\getvalue{\e!stop \??fm\formulaparameter\c!align}}
>
> which are defined in math-ali.mkiv. However, strc-mat.mkiv redefines these
> to \empty, so the simple math alignment does not work anymore.
>
> Hans: we need to either move these definitions from math-ali to strc-mat or
> remove
>
> \let\startinnermath\empty
> \let\stopinnermath \empty
>
> from strc-mat.mkiv
>
> 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  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-12-16  3:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-29 23:45 Math Alignment - start equation at left margin Curiouslearn
2009-11-30  7:40 ` Otared Kavian
2009-11-30  7:50 ` Otared Kavian
2009-11-30 23:54   ` Curiouslearn
2009-12-15 11:41 ` Aditya Mahajan
2009-12-15 11:56   ` Hans Hagen
2009-12-16  3:41   ` Curiouslearn

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