Re: [NTG-context] Flushleft formula

2016-06-18 Thread Hans Hagen

On 6/17/2016 7:48 AM, Aditya Mahajan wrote:

On Thu, 16 Jun 2016, Alan BRASLAU wrote:


On Thu, 16 Jun 2016 18:18:58 -0400
Aditya Mahajan  wrote:


And some stage, it will be nice to discuss the possiblility of adding
background to formulas, especially aligned formulas.


something like a

\setupformula
 [before={\startframedtext[background=color,backgroundcolor=lightblue]},
  after={\stopframedtext}]


One typically wants to have a bounding box around the displayed math,
but not the white space or the equation number. For example, see the
attached image.


experimental framed support in beta ...

\starttext

\setupformulaframed[framecolor=red,frame=on,offset=1ex]
\setupformula[option=frame,color=blue]
\setupformula[numbercommand={\inframed[framecolor=green]}]

\startplaceformula
\startformula
2 + 2 = 3 + 1
\stopformula
\stopplaceformula

\stoptext

see framed-002.tex in test suite for a bunch of examples

(rather tricky with respect to spacing and alignments etc)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

Re: [NTG-context] Flushleft formula

2016-06-17 Thread Hans Hagen

On 6/17/2016 12:18 AM, Aditya Mahajan wrote:

On Thu, 16 Jun 2016, Hans Hagen wrote:


On 6/16/2016 6:58 PM, Aditya Mahajan wrote:

 Hi,

 Something has changed with respect to the align=flushleft option for
 formulas. Earlier (tested with 2016.05.08), align=flushleft did not
 remove the leftskip, but now it does.


it doesn't but somehow it's not effective

(indeed spacing was updated, some more - future - possibilities and
bester handling in boxes and such)


And some stage, it will be nice to discuss the possiblility of adding
background to formulas, especially aligned formulas. Similar to some of
the examples in http://texdoc.net/texmf-dist/doc/latex/mathtools/empheq.pdf


actually, backgrounds were a reason for some changes but the code that 
does that is not yet integrated (still considering the interface)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

Re: [NTG-context] Flushleft formula

2016-06-16 Thread Aditya Mahajan

On Thu, 16 Jun 2016, Alan BRASLAU wrote:


On Thu, 16 Jun 2016 18:18:58 -0400
Aditya Mahajan  wrote:


And some stage, it will be nice to discuss the possiblility of adding
background to formulas, especially aligned formulas.


something like a

\setupformula
 [before={\startframedtext[background=color,backgroundcolor=lightblue]},
  after={\stopframedtext}]


One typically wants to have a bounding box around the displayed math, but 
not the white space or the equation number. For example, see the attached 
image.


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
___

Re: [NTG-context] Flushleft formula

2016-06-16 Thread Alan BRASLAU
On Thu, 16 Jun 2016 18:18:58 -0400
Aditya Mahajan  wrote:

> And some stage, it will be nice to discuss the possiblility of adding 
> background to formulas, especially aligned formulas.

something like a

\setupformula
  [before={\startframedtext[background=color,backgroundcolor=lightblue]},
   after={\stopframedtext}]

?

("untested")

Alan
___
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
___

Re: [NTG-context] Flushleft formula

2016-06-16 Thread Aditya Mahajan

On Thu, 16 Jun 2016, Hans Hagen wrote:


On 6/16/2016 6:58 PM, Aditya Mahajan wrote:

 Hi,

 Something has changed with respect to the align=flushleft option for
 formulas. Earlier (tested with 2016.05.08), align=flushleft did not
 remove the leftskip, but now it does.


it doesn't but somehow it's not effective

(indeed spacing was updated, some more - future - possibilities and bester 
handling in boxes and such)


And some stage, it will be nice to discuss the possiblility of adding 
background to formulas, especially aligned formulas. Similar to some of 
the examples in 
http://texdoc.net/texmf-dist/doc/latex/mathtools/empheq.pdf



 Consider the following example:

 \showframe
 \setupitemize[margin=6em]
 \setupformula[align=flushleft]

 \starttext
 \startitemize
   \item An equation inside an itemize
 \startformula
   E = mc^2
 \stopformula
 \stopitemize
 \stoptext

 The output of 2016.05.06 is attached as test-old.pdf; that of 2016.06.16
 is attached as test-new.pdf

 Is it possible to revert to the old behavior?


can you test with

  \hskip\d_strc_formulas_display_margin_left % was kern but that doesn't 
indent


line 1153 in math-ali.mkiv


I guess you already added it to the new beta. It works correctly.

Thanks,
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
___

Re: [NTG-context] Flushleft formula

2016-06-16 Thread Hans Hagen

On 6/16/2016 6:58 PM, Aditya Mahajan wrote:

Hi,

Something has changed with respect to the align=flushleft option for
formulas. Earlier (tested with 2016.05.08), align=flushleft did not
remove the leftskip, but now it does.


it doesn't but somehow it's not effective

(indeed spacing was updated, some more - future - possibilities and 
bester handling in boxes and such)



Consider the following example:

\showframe
\setupitemize[margin=6em]
\setupformula[align=flushleft]

\starttext
\startitemize
  \item An equation inside an itemize
\startformula
  E = mc^2
\stopformula
\stopitemize
\stoptext

The output of 2016.05.06 is attached as test-old.pdf; that of 2016.06.16
is attached as test-new.pdf

Is it possible to revert to the old behavior?


can you test with

   \hskip\d_strc_formulas_display_margin_left % was kern but that 
doesn't indent


line 1153 in math-ali.mkiv

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

[NTG-context] Flushleft formula

2016-06-16 Thread Aditya Mahajan

Hi,

Something has changed with respect to the align=flushleft option for 
formulas. Earlier (tested with 2016.05.08), align=flushleft did not remove 
the leftskip, but now it does.


Consider the following example:

\showframe
\setupitemize[margin=6em]
\setupformula[align=flushleft]

\starttext
\startitemize
  \item An equation inside an itemize
\startformula
  E = mc^2
\stopformula
\stopitemize
\stoptext

The output of 2016.05.06 is attached as test-old.pdf; that of 2016.06.16 
is attached as test-new.pdf


Is it possible to revert to the old behavior?

Thanks,
Aditya

test-new.pdf
Description: Adobe PDF document


test-old.pdf
Description: Adobe PDF document
___
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
___