Question: Can i insert formatted text into Document-mode from procedure?

I know how to define a procedure and use print() as follows:

test := proc (x)
  print("x is equal to: ");
  x
end proc

This displays as follows:
test(2)

"x is equal to: "

2

But i would like to appear as follows:

x is equal to: 2

 

Where the "x is equal to: "-part is standard a "text-mode-block" with green color.

Can i accomplish this in Maple, and can i do more advanced formatting?

 

Best regards,

Martin

Please Wait...