ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Split \startalign content on more pages
@ 2012-05-22  5:49 elgospa
  0 siblings, 0 replies; 12+ messages in thread
From: elgospa @ 2012-05-22  5:49 UTC (permalink / raw)
  To: ntg-context

Thank you Luigi.
I haven't tried your solution yet, as I was abroad the previous days.
I hope I will try later.
Bye.

Arrigo
___________________________________________________________________________________
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] 12+ messages in thread

* Re: Split \startalign content on more pages
  2012-05-14 10:02 elgospa
@ 2012-05-15 10:45 ` luigi scarso
  0 siblings, 0 replies; 12+ messages in thread
From: luigi scarso @ 2012-05-15 10:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, May 14, 2012 at 12:02 PM, elgospa@libero.it <elgospa@libero.it> wrote:
> Yes it works.
> The only problem is that now I have the formulas aligned at the center of the
> page.
> Which command can I use to align the formulas on the left?
\setupformulas[alternative=default,margin=-6em]
(with try-and-error )

-- 
luigi
___________________________________________________________________________________
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] 12+ messages in thread

* Split \startalign content on more pages
@ 2012-05-14 10:02 elgospa
  2012-05-15 10:45 ` luigi scarso
  0 siblings, 1 reply; 12+ messages in thread
From: elgospa @ 2012-05-14 10:02 UTC (permalink / raw)
  To: ntg-context

Yes it works.
The only problem is that now I have the formulas aligned at the center of the 
page.
Which command can I use to align the formulas on the left?

___________________________________________________________________________________
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] 12+ messages in thread

* Re: Split \startalign content on more pages
  2012-05-14  4:37 elgospa
@ 2012-05-14  8:32 ` luigi scarso
  0 siblings, 0 replies; 12+ messages in thread
From: luigi scarso @ 2012-05-14  8:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2012/5/14 elgospa@libero.it <elgospa@libero.it>:
> Sorry for having given you a non working example!
> Here you can find a working one. The comments at the end of each line are in
> italian.
> Changing the height of the frame you can move the \startalign content in the
> page.
> As you will see, the whole content flows from one page to the following,
> without splitting at the right line.
> Thank you very much for your help.
Comment the lines
\setupformulas[align=right]
and try .
Does it work ?

-- 
luigi
___________________________________________________________________________________
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] 12+ messages in thread

* Split \startalign content on more pages
@ 2012-05-14  4:37 elgospa
  2012-05-14  8:32 ` luigi scarso
  0 siblings, 1 reply; 12+ messages in thread
From: elgospa @ 2012-05-14  4:37 UTC (permalink / raw)
  To: ntg-context

Sorry for having given you a non working example!
Here you can find a working one. The comments at the end of each line are in 
italian. 
Changing the height of the frame you can move the \startalign content in the 
page.
As you will see, the whole content flows from one page to the following, 
without splitting at the right line.
Thank you very much for your help.



%INIZIO PREAMBOLO
\setuppapersize[A4, portrait] [A4]% layout di pagina su foglio A4
\setuplayout[width=middle]% disposizione del testo sulla pagina
\setuppagenumbering[location={footer, middle}]% numero di pagina in basso al 
centro
\setupbodyfont[11pt]% altezza carattere 11pt
\setupcolors[state=start, rgb=yes]% per usare colori
\setupcolor[rgb]% carico colori di default
\setuptabulate[split=yes]% consente di spezzare le liste di tabualte su più 
pagine
%\setupindenting[medium, yes]% indentazione prima linea di paragrafi
\mainlanguage[it]% lingua principale del documento
\usemodule[units]% per scrivere le unità di misura in maniera coerente sia in 
modalità testo che matematico
%\usemodule[NTE]% per crare le tabelle complesse multipagina utilizzando 
l'ambiente TABLE
%
%----------COMANDI DEFINITI DA UTENTE-----------------
% comando \sb
\def\sb#1{\ctxlua{tex.print(#1)}}% definizione comando di sostituzione dei 
valori numerici a quelli letterali
% comando \sba
\def\sba#1{\ctxlua{tex.print(string.format("\%.0f", #1))}}% sostituisce numero 
a valori letterali scrivendolo senza cifre decimali
% comando \sbb
\define[1]\sbb{\ctxlua{context("\%.1f", #1)}}% sostituisce numero a valori 
letterali scrivendolo con 1 cifra decimale
% comando \sbc
\define[1]\sbc{\ctxlua{context("\%.2f", #1)}}% sostituisce numero a valori 
letterali scrivendolo con 2 cifre decimali
% comando \sbd
\define[1]\sbd{\ctxlua{context("\%.3f", #1)}}% sostituisce numero a valori 
letterali scrivendolo con 3 cifre decimali

\definedescription[descr][style=packed,headstyle=bold,style=normal,
location=hanging,width=broad,margin=1cm]
%FINE PREAMBOLO

\starttext
Bla bla bla

{\framed[height=15cm] Bla Bla}




\startluacode
e_yfi=5
R_fi=2000
r_fi=300
D_ifi=2500
P_dfi=0.6
f_dfi=200

e_dtryfi=1 -- spessore di tentativo in progetto in mm
e_yfi=100 -- inizializzo il valore ey a 100
while math.abs(e_yfi-e_dtryfi)>0.001 do
	e_dtryfi=e_yfi
	Y=math.min((e_dtryfi / R_fi), 0.04)
	Z=math.log10(1/Y)
	X=r_fi/D_ifi
	N=1.006-(1 / (6.2+(90*(Y^4))))
	beta006=N*((-0.3635*(Z^3))+(2.2124*(Z^2))-(3.2937*Z)+1.8873)
	beta01=N*((-0.1833*(Z^3))+(1.0383*(Z^2))-(1.2943*Z)+0.837)
	beta02=math.max(0.95*(0.56-(1.94*Y)-(83.5*(Y^2))), 0.5)
	if X==0.06 then
		beta=beta006
	elseif 0.06<X and X<0.1 then
		beta=25*(((0.1-X)*beta006)+((X-0.06)*beta01))
	elseif X==0.1 then
		beta=beta01
	elseif 0.1<X and X<0.2 then
		beta=10*(((0.2-X)*beta01)+((X-0.1)*beta02))
	elseif X==0.2 then
		beta=beta02
	else tex.print("\\red{ERRORE NELLA GEOMETRIA DEL FONDO INFERIORE}")
	end
	e_yfi=(beta*P_dfi*((0.75*R_fi)+(0.2*D_ifi)))/f_dfi
end

\stopluacode


\setupformulas[align=right]
\startformula
\startalign[n=3, align={left, right, left}]
\NC \text{dove} \quad	\NC Y \NC = min \left({{e_{yfi}} \over {R_{fi}}}; 0.04 
\right) = min \left({{\sbc{e_yfi}} \over {\sba{R_fi}}}; 0.04 \right)=\sbd{Y} 
\NR
\NC 					\NC Z \NC = log_{10} \left({1 \over Y} \right) = log_{10} \left({1 
\over \sbd{Y}} \right) = \sbc{Z} \NR
\NC 					\NC X \NC = {{r_{fi}} \over {D_{ifi}}} = {{\sba{r_fi}} \over {\sba
{D_ifi}}} = \sbd{X} \NR
\NC 					\NC N \NC = 1.006 - {1 \over {6.2 + \left(90 \cdot Y \right)^4}} = 
1.006 - {1 \over {6.2 + \left(90 \cdot \sbd{Y} \right)^4}} = \sbd{N} \NR
\startluacode
if X==0.06 then
	tex.print("\\NC  \\NC \\beta_{0.06} \\NC = N \\cdot \\left(-0.3635 \\cdot Z^3 
+ 2.2124 \\cdot Z^2 - 3.2937 \\cdot Z + 1.8873 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.3635 \\cdot \\sbc{Z}^3 
+ 2.2124 \\cdot \\sbc{Z}^2 - 3.2937 \\cdot \\sbc{Z} + 1.8873 \\right) = \\sbc
{beta006} \\NR")
	tex.print("\\NC  \\NC \\beta \\NC =\\beta_{0.06}=\\sbc{beta006} \\NR")
elseif X>0.06 and X<0.1 then
	tex.print("\\NC  \\NC \\beta_{0.06} \\NC = N \\cdot \\left(-0.3635 \\cdot Z^3 
+ 2.2124 \\cdot Z^2 - 3.2937 \\cdot Z + 1.8873 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.3635 \\cdot \\sbc{Z}^3 
+ 2.2124 \\cdot \\sbc{Z}^2 - 3.2937 \\cdot \\sbc{Z} + 1.8873 \\right) = \\sbc
{beta006} \\NR")
	tex.print("\\NC  \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 
+ 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 
+ 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc
{beta01} \\NR")
	tex.print("\\NC  \\NC \\beta \\NC = 25 \\cdot \\left[ \\left(0.1 - X \\right) 
\\cdot \\beta_{0.06} + \\left(X - 0.06 \\right) \\cdot \\beta_{0.1} \\right]= 
\\NR")
	tex.print("\\NC  \\NC        \\NC = 25 \\cdot \\left[ \\left(0.1 - \\sbd{X} 
\\right) \\cdot \\sbc{beta006} + \\left(\\sbd{X} - 0.06 \\right) \\cdot \\sbc
{beta01} \\right]=\\sbd{beta} \\NR")
elseif X==0.1 then
	tex.print("\\NC  \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 
+ 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR")
	tex.print("\\NC  \\NC 			   \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 
+ 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc
{beta01} \\NR")
	tex.print("\\NC  \\NC \\beta       \\NC =\\beta_{0.1}=\\sbc{beta01} \\NR")
elseif X>0.1 and X<0.2 then
	tex.print("\\NC  \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 
+ 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 
+ 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc
{beta01} \\NR")
	tex.print("\\NC  \\NC \\beta_{0.2} \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot Y - 82.5 \\cdot Y^2 \\right); 0.5 \\right] \\NR")
	tex.print("\\NC  \\NC              \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot \\sbd{Y} - 82.5 \\cdot \\sbd{Y}^2 \\right); 0.5 \\right] = \\sbd
{beta02} \\NR")
	tex.print("\\NC  \\NC \\beta \\NC = 10 \\cdot \\left[ \\left(0.2 - X \\right) 
\\cdot \\beta_{0.1} + \\left(X - 0.1 \\right) \\cdot \\beta_{0.2} \\right]= 
\\NR")
	tex.print("\\NC  \\NC        \\NC = 10 \\cdot \\left[ \\left(0.2 - \\sbd{X} 
\\right) \\cdot \\sbc{beta01} + \\left(\\sbd{X} - 0.1 \\right) \\cdot \\sbc
{beta02} \\right]=\\sbd{beta} \\NR")
elseif X==0.2 then
	tex.print("\\NC  \\NC \\beta_{0.2} \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot Y - 82.5 \\cdot Y^2 \\right); 0.5 \\right] \\NR")
	tex.print("\\NC  \\NC              \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot \\sbd{Y} - 82.5 \\cdot \\sbd{Y}^2 \\right); 0.5 \\right] = \\sbd
{beta02} \\NR")
	tex.print("\\NC  \\NC \\beta       \\NC =\\beta_{0.2}=\\sbd{beta02} \\NR")
end
\stopluacode
\stopalign
\stopformula
\setupformulas[align=middle]

\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] 12+ messages in thread

* Re: Split \startalign content on more pages
  2012-05-13 13:54 elgospa
  2012-05-13 14:23 ` luigi scarso
@ 2012-05-13 16:36 ` Aditya Mahajan
  1 sibling, 0 replies; 12+ messages in thread
From: Aditya Mahajan @ 2012-05-13 16:36 UTC (permalink / raw)
  To: elgospa, mailing list for ConTeXt users

On Sun, 13 May 2012, elgospa@libero.it wrote:

> \sbc{} is a command defined by me.
> \define[1]\sbc{\ctxlua{context("\%.2f", #1)}}%
> I'm writing a technical report and I use that command to substitute numbers to
> letters in formulas.

Please create a complete working minimal example.

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] 12+ messages in thread

* Re: Split \startalign content on more pages
  2012-05-13 13:54 elgospa
@ 2012-05-13 14:23 ` luigi scarso
  2012-05-13 16:36 ` Aditya Mahajan
  1 sibling, 0 replies; 12+ messages in thread
From: luigi scarso @ 2012-05-13 14:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, May 13, 2012 at 3:54 PM, elgospa@libero.it <elgospa@libero.it> wrote:
> \sbc{} is a command defined by me.
> \define[1]\sbc{\ctxlua{context("\%.2f", #1)}}%
> I'm writing a technical report and I use that command to substitute numbers to
> letters in formulas.

ok, I'm using
\def\sbc#1{#1}
\let\sbd\sbc
\let\sba\sbc
but I've an error  --- X is undefined .
-- 
luigi
___________________________________________________________________________________
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] 12+ messages in thread

* Split \startalign content on more pages
@ 2012-05-13 13:54 elgospa
  2012-05-13 14:23 ` luigi scarso
  2012-05-13 16:36 ` Aditya Mahajan
  0 siblings, 2 replies; 12+ messages in thread
From: elgospa @ 2012-05-13 13:54 UTC (permalink / raw)
  To: ntg-context

\sbc{} is a command defined by me.
\define[1]\sbc{\ctxlua{context("\%.2f", #1)}}%
I'm writing a technical report and I use that command to substitute numbers to 
letters in formulas.

___________________________________________________________________________________
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] 12+ messages in thread

* Re: Split \startalign content on more pages
  2012-05-11  9:16 elgospa
@ 2012-05-11  9:23 ` luigi scarso
  0 siblings, 0 replies; 12+ messages in thread
From: luigi scarso @ 2012-05-11  9:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, May 11, 2012 at 11:16 AM, elgospa@libero.it <elgospa@libero.it> wrote:
> Thank you very much Luigi.
>
> Any idea on how to split the \startalign content?
No, I've an error


! Undefined control sequence.

system          > tex > error on line 16 in file test.tex: Undefined
control sequence ...

 6     %context.NC() context("Hello") context.vrule(72.27*2^16,
2^16,2^16) context.NC() context("%s", "World") context.NR()
 7     %context.stoptabulate()
 8     %\stopluacode
 9     %\stoptext
10
11     \setupformulas[align=right]
12     \starttext
13     \startformula
14     \startalign[n=3, align={left, right, left}]
15     \NC \text{dove} \quad   \NC Y \NC = min \left({{e_{yfitest}}
\over {R_{fi}}};
16 >>  0.04 \right) = min \left({{\sbc{e_yfitest}} \over
{\sba{R_fi}}}; 0.04 \right)
17     =\sbd{Y} \NR
18     \NC                                     \NC Z \NC = log_{10}
\left({1 \over Y} \right) = log_{10} \left({1
19     \over \sbd{Y}} \right) = \sbc{Z} \NR
20     \NC                                     \NC X \NC = {{r_{fi}}
\over {D_{ifi}}} = {{\sba{r_fi}} \over {\sba
21     {D_ifi}}} = \sbd{X} \NR
22     \NC                                     \NC N \NC = 1.006 - {1
\over {6.2 + \left(90 \cdot Y \right)^4}} =
23     1.006 - {1 \over {6.2 + \left(90 \cdot \sbd{Y} \right)^4}} = \sbd{N} \NR
24     \startluacode
25     if X==0.06 then
26            tex.print("\\NC  \\NC \\beta_{0.06} \\NC = N \\cdot
\\left(-0.3635 \\cdot Z^3

l.16 0.04 \right) = min \left({{\sbc
                                    {e_yfitest}} \over {\sba{R_fi}}}; 0.04 \...

Perhaps \sbc is a macro from latex...
___________________________________________________________________________________
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] 12+ messages in thread

* Split \startalign content on more pages
@ 2012-05-11  9:16 elgospa
  2012-05-11  9:23 ` luigi scarso
  0 siblings, 1 reply; 12+ messages in thread
From: elgospa @ 2012-05-11  9:16 UTC (permalink / raw)
  To: ntg-context

Thank you very much Luigi.

Any idea on how to split the \startalign content?

___________________________________________________________________________________
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] 12+ messages in thread

* Re: Split \startalign content on more pages
  2012-05-09 11:44 elgospa
@ 2012-05-10  7:58 ` luigi scarso
  0 siblings, 0 replies; 12+ messages in thread
From: luigi scarso @ 2012-05-10  7:58 UTC (permalink / raw)
  To: elgospa, mailing list for ConTeXt users

On Wed, May 9, 2012 at 1:44 PM, elgospa@libero.it <elgospa@libero.it> wrote:

> And by the way, is there a clever way to write a block of text under some
> conditions as shown in the example above other than tex.print(".....") which
> forces to escape every command?
> Thank you very much.
> Bye

\starttext
\startluacode
context.starttabulate{"|l|r|l"}
context("\\NC Hello\\vrule width 1in height 1pt depth 1pt\\NC World  \\NR")
context.NC() context("Hello\\vrule width 1in height 1pt depth 1pt")
context.NC() context("%s", "World") context.NR()
context.NC() context("Hello") context.vrule(72.27*2^16, 2^16,2^16)
context.NC() context("%s", "World") context.NR()
context.stoptabulate()
\stopluacode
\stoptext

-- 
luigi
___________________________________________________________________________________
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] 12+ messages in thread

* Split \startalign content on more pages
@ 2012-05-09 11:44 elgospa
  2012-05-10  7:58 ` luigi scarso
  0 siblings, 1 reply; 12+ messages in thread
From: elgospa @ 2012-05-09 11:44 UTC (permalink / raw)
  To: ntg-context

Hello,
I'm a new user of context (and of this mailing list).
I'm facing some problems in splitting the \startalign ... \stopalign content 
on more pages.
This is the formulas:

\setupformulas[align=right]
\startformula
\startalign[n=3, align={left, right, left}]
\NC \text{dove} \quad	\NC Y \NC = min \left({{e_{yfitest}} \over {R_{fi}}}; 
0.04 \right) = min \left({{\sbc{e_yfitest}} \over {\sba{R_fi}}}; 0.04 \right)
=\sbd{Y} \NR
\NC 					\NC Z \NC = log_{10} \left({1 \over Y} \right) = log_{10} \left({1 
\over \sbd{Y}} \right) = \sbc{Z} \NR
\NC 					\NC X \NC = {{r_{fi}} \over {D_{ifi}}} = {{\sba{r_fi}} \over {\sba
{D_ifi}}} = \sbd{X} \NR
\NC 					\NC N \NC = 1.006 - {1 \over {6.2 + \left(90 \cdot Y \right)^4}} = 
1.006 - {1 \over {6.2 + \left(90 \cdot \sbd{Y} \right)^4}} = \sbd{N} \NR
\startluacode
if X==0.06 then
	tex.print("\\NC  \\NC \\beta_{0.06} \\NC = N \\cdot \\left(-0.3635 \\cdot Z^3 
+ 2.2124 \\cdot Z^2 - 3.2937 \\cdot Z + 1.8873 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.3635 \\cdot \\sbc{Z}^3 
+ 2.2124 \\cdot \\sbc{Z}^2 - 3.2937 \\cdot \\sbc{Z} + 1.8873 \\right) = \\sbc
{beta006} \\NR")
	tex.print("\\NC  \\NC \\beta \\NC =\\beta_{0.06}=\\sbc{beta006} \\NR")
elseif X>0.06 and X<0.1 then
	tex.print("\\NC  \\NC \\beta_{0.06} \\NC = N \\cdot \\left(-0.3635 \\cdot Z^3 
+ 2.2124 \\cdot Z^2 - 3.2937 \\cdot Z + 1.8873 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.3635 \\cdot \\sbc{Z}^3 
+ 2.2124 \\cdot \\sbc{Z}^2 - 3.2937 \\cdot \\sbc{Z} + 1.8873 \\right) = \\sbc
{beta006} \\NR")
	tex.print("\\NC  \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 
+ 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 
+ 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc
{beta01} \\NR")
	tex.print("\\NC  \\NC \\beta \\NC = 25 \\cdot \\left[ \\left(0.1 - X \\right) 
\\cdot \\beta_{0.06} + \\left(X - 0.06 \\right) \\cdot \\beta_{0.1} \\right]= 
\\NR")
	tex.print("\\NC  \\NC        \\NC = 25 \\cdot \\left[ \\left(0.1 - \\sbd{X} 
\\right) \\cdot \\sbc{beta006} + \\left(\\sbd{X} - 0.06 \\right) \\cdot \\sbc
{beta01} \\right]=\\sbd{beta} \\NR")
elseif X==0.1 then
	tex.print("\\NC  \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 
+ 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR")
	tex.print("\\NC  \\NC 			   \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 
+ 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc
{beta01} \\NR")
	tex.print("\\NC  \\NC \\beta       \\NC =\\beta_{0.1}=\\sbc{beta01} \\NR")
elseif X>0.1 and X<0.2 then
	tex.print("\\NC  \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 
+ 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR")
	tex.print("\\NC  \\NC 			    \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 
+ 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc
{beta01} \\NR")
	tex.print("\\NC  \\NC \\beta_{0.2} \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot Y - 82.5 \\cdot Y^2 \\right); 0.5 \\right] \\NR")
	tex.print("\\NC  \\NC              \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot \\sbd{Y} - 82.5 \\cdot \\sbd{Y}^2 \\right); 0.5 \\right] = \\sbd
{beta02} \\NR")
	tex.print("\\NC  \\NC \\beta \\NC = 10 \\cdot \\left[ \\left(0.2 - X \\right) 
\\cdot \\beta_{0.1} + \\left(X - 0.1 \\right) \\cdot \\beta_{0.2} \\right]= 
\\NR")
	tex.print("\\NC  \\NC        \\NC = 10 \\cdot \\left[ \\left(0.2 - \\sbd{X} 
\\right) \\cdot \\sbc{beta01} + \\left(\\sbd{X} - 0.1 \\right) \\cdot \\sbc
{beta02} \\right]=\\sbd{beta} \\NR")
elseif X==0.2 then
	tex.print("\\NC  \\NC \\beta_{0.2} \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot Y - 82.5 \\cdot Y^2 \\right); 0.5 \\right] \\NR")
	tex.print("\\NC  \\NC              \\NC = max \\left[ 0.95 \\cdot \\left(0.56 
- 1.94 \\cdot \\sbd{Y} - 82.5 \\cdot \\sbd{Y}^2 \\right); 0.5 \\right] = \\sbd
{beta02} \\NR")
	tex.print("\\NC  \\NC \\beta       \\NC =\\beta_{0.2}=\\sbd{beta02} \\NR")
end
\stopluacode
\stopalign
\stopformula
\setupformulas[align=middle]

I have already tried to insert split=yes in the options of the align 
environment without success.
I have read in "Using \startalign and friends" which is a document dated 2006  
that the splitting capability of \startalign is broken. Is it still so?

And by the way, is there a clever way to write a block of text under some 
conditions as shown in the example above other than tex.print(".....") which 
forces to escape every command?
Thank you very much.
Bye



___________________________________________________________________________________
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] 12+ messages in thread

end of thread, other threads:[~2012-05-22  5:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22  5:49 Split \startalign content on more pages elgospa
  -- strict thread matches above, loose matches on Subject: below --
2012-05-14 10:02 elgospa
2012-05-15 10:45 ` luigi scarso
2012-05-14  4:37 elgospa
2012-05-14  8:32 ` luigi scarso
2012-05-13 13:54 elgospa
2012-05-13 14:23 ` luigi scarso
2012-05-13 16:36 ` Aditya Mahajan
2012-05-11  9:16 elgospa
2012-05-11  9:23 ` luigi scarso
2012-05-09 11:44 elgospa
2012-05-10  7:58 ` luigi scarso

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