Breaking up large numbers in (GNU Emacs) imaxima?



A large integer is not broken up into several lines unless display2d
is set to "false".  But it's a pain to keep changing the settings of
display2d depending on the output.  Is there any way of changing the
display2d variable depending on the output?  So that, for example if
integerp(output) returns "true", then display2d is automatically set
to "false" for that output only?

Alternatively, is there any way of keeping display2d set to "imaxima"
but break up large integers?

Thanks,
Alasdair