Question: DataFrame limit equation length displayed

This is a follow on from and earlier question on tabulation. Some procdures returs up tp eight values. So using a Table make it easier to see what is what. Sometimes the equations returned are very long. Is there a way to truncate what is display in the table using something along the lines of term elision? Say the 1st 300 chatacters for example?  

Edit: Corrected an error in the worksheet.

restart

QQFProj := proc(q12::algebraic, q23::algebraic,
                q34::algebraic, q14::algebraic,
                  prnt::boolean:=true) #{columns:=[QQFproj,Q13proj,Q24proj]}
  description "Projective quadruple quad formula and intermediate 13 and 24 quads. Useful for cyclic quadrilaterals";
  local qqf,q13,q24, sub1,sub2,sub3, R,values,DF,lens;
  uses   DocumentTools;
  sub1:= (q12 + q23 + q34 + q14)^2 - 2*(q12^2 + q23^2 + q34^2 + q14^2) ;
  sub2:=-4*(q12*q23*q34+q12*q23*q14+q12*q34*q14+q23*q34*q14)+8*q12*q23*q34*q14;
  sub3:=64*q12*q23*q34*q14*(1-q12)*(1-q23)*(1-q34)*(1-q14);
  qqf:=((sub1+sub2)^2=sub3);
  q13:=((q12-q23)^2-(q34-q14)^2)/(2*(q12+q23-q34-q14-2*q12*q23+2*q34*q14));#check this
  q24:=((q23-q34)^2-(q12-q14)^2)/(2*(q23+q34-q12-q14-2*q23*q34+2*q12*q14));#check this
  if prnt then
  
   values:=<qqf,q13,q24>;
   DF:=DataFrame(<values>, columns=[`"Values Equations"`],rows=[`#1  QQF`,`#2  Q13`,`#3  Q24`]);
   lens := [4 +8* max(op(length~(RowLabels(DF)))),4+ min(max( 10*(length~(values))),1000)];#op(length~(ColumnLabels(DF)0)
   Tabulate(DF,width=add(lens),widthmode = pixels,weights = lens);
  return qqf,q13,q24
  end if;
  return qqf,q13,q24
end proc:

 q12:=1/2:q23:=9/10:q34:=25/26:q41:=9/130:#Cyclic quadrilateral
q12:=sqrt(17+a)/2:q23:=expand(r^2+t^2)^2/10:q34:=expand((a+b+c)^4/26):q41:=sqrt(17+b)/130:

Q:=QQFProj(q12,q23,q34,q41,true):

#Q[1]

#(Q[2])

#Q[3]

length(Q[1])

2669

(1)

length(Q[2])

1024

(2)

length(Q[3])

1024

(3)
 

 

Download 2024-05-14_Q_Data_Table_Limit_Equation_lentgh.mw

Please Wait...