|
|
last edited 10 years ago by test1 |
1 2 3 4 | ||
Editor: test1
Time: 2014/05/06 19:32:03 GMT+0 |
||
Note: |
added:
Width of output depends on formater. In case of formats such as TeX or MathML the actual typesetting
happens outside FriCAS and we have no way to know true width. So 'width' in OutputForm is ill-defined
and for this reason removed from FriCAS.
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
The function width is not implemented in OutputForm .
However, the width for squares and fractions seems to be wrong:
x^2
2 (2) x
width((x^2)::OutputForm)$OutputForm
The function width is not implemented in OutputForm .
I would expect 2 here.
1/2
1 (3) - 2
width((1/2)::OutputForm)$OutputForm
The function width is not implemented in OutputForm .
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.
Width of output depends on formater. In case of formats such as TeX? or MathML? the actual typesetting
happens outside FriCAS? and we have no way to know true width. So width
in OutputForm? is ill-defined
and for this reason removed from FriCAS?.
Martin