|
|
last edited 10 years ago by test1 |
1 2 3 4 | ||
Editor: kratt6
Time: 2007/12/20 02:02:14 GMT-8 |
||
Note: give more details |
changed: -In 'OutputForm' there is a function 'width' that returns the amount of space taken by some element of 'OutputForm'. For example In 'OutputForm' there is a function 'width' that returns the amount of space taken by some element of 'OutputForm' when printed as ASCII. For example added: )se ou alg on )se ou tex off sin x added: x^2 added: \end{axiom} I would expect 2 here. \begin{axiom} 1/2 added: I would expect 1 here. added: It would be good to have a similar function for TeX output, by the way.
In OutputForm
there is a function width
that returns the amount of space taken by some element of OutputForm
when printed as ASCII. For example
)se ou alg on
)se ou tex off
sin x
(1) sin(x)
width((sin x)::OutputForm)$OutputForm
(2) 6
However, the width for squares and fractions seems to be wrong:
x^2
2 (3) x
width((x^2)::OutputForm)$OutputForm
(4) 5
I would expect 2 here.
1/2
1 (5) - 2
width((1/2)::OutputForm)$OutputForm
(6) 5
I would expect 1 here.
The function is unfortunately not implemented in SPAD but rather calls outformWidth
coded in BOOT in the
file i-output.boot
.
It would be good to have a similar function for TeX? output, by the way. Martin