From: Gunter K. <gu...@pe...> - 2022-08-24 05:35:56
|
For the blank lines I have no solution. But the parenthesis can be removed using lmxchar and its right-hand equivalent. Kind regards, Gunter. Am 24. August 2022 02:45:30 MESZ schrieb Eduardo Ochs <edu...@gm...>: >Hi list, > >I am trying to learn how to define new operators that have "nice" >representations in LaTeX and in display2d. Here is the example on >which I am working. I want > > Eq5(aa, bb, cc, dd, ee) > >to be displayed as: > > aa = bb > = cc > = dd > = ee > >To configure its LaTeX output I simply adapted the example in the >section about "texput" here, > > (info "(maxima)Functions and Variables for TeX Output") > >and I wrote this: > > texEq5(ex) := > block([a,b,c,d,e], [a,b,c,d,e] : args (ex), > concat("\\begin{array}{rcl}", > tex1(a), "&=&", tex1(b), "\\\\", > "&=&", tex1(c), "\\\\", > "&=&", tex1(d), "\\\\", > "&=&", tex1(e), "\\\\", > "\\end{array}")); > texput(Eq5, texEq5); > tex(Eq5(aa, bb, cc, dd, ee)); > >Here's the output of the last line above, indented by hand: > > $$\begin{array}{rcl} > {\it aa} &=& {\it bb} \\ > &=& {\it cc} \\ > &=& {\it dd} \\ > &=& {\it ee} \\ > \end{array} > $$ > >This was easy to do, and works great. But I couldn't find much >documentation on how to configure how display2d displays "Eq5" >objects. I was only able to write this prototype for the first step: > > MatrixEq5(ex) := > block([a,b,c,d,e], [a,b,c,d,e] : args (ex), > matrix([a,"=",b],["","=",c],["","=",d],["","=",e]))$ > >If I run this > > MatrixEq5(Eq5(aa, bb, cc, dd, ee)); > >the output is: > > [ aa = bb ] > [ ] > [ = cc ] > [ ] > [ = dd ] > [ ] > [ = ee ] > >So, questions: > > 1) How can I get rid of the outer "[]"s? > 2) How can I get rid of the blank lines? > 3) How can I make Eq5 objects be displayed with MatrixEq5? > 4) Where can I find docs and examples about this? > >Thanks in advance! =) > Eduardo Ochs > http://angg.twu.net/eev-maxima.html |