Question: How to have a nice display of piecewise in this context?


I would like the display of a piecewise-function F with DocumentTools:-Tabulate to look like the one I get with print.
How is it possible to do this?

Here is an example


MV := kernelopts(version);
Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895

# Extract the version number for subsequent use
MV := parse(substring(StringTools:-Split(convert(MV, string), ",")[1], 7..-1))

# I want to display F and G while using DocumentTools
# As you see the display of F is not very pretty.
# This is not a problem related to the "height" of the formula for G is pretty-displayed
# even if it as roughly the same "height" than F

F := piecewise(seq(op([x<k, k]), k=1..5)):
g := x -> 1/(1+x):
G := (g@@5)(x):
Tabulate([F, G]):

# using DocumentTools:-Layout doesn't help

C1 := Cell( Textfield(style=TwoDimOutput,Equation(F))):
C2 := Cell( Textfield(style=TwoDimOutput,Equation(G))):
T  := Table(Column(),Column(),
         Row( C1, C2 )

if MV < 2018 then
  InsertContent(Worksheet(Group(Input( T )))):
  InsertContent(Worksheet( T )):
end if;

This is what DocumentTools:-Tabulate displays


Please Wait...