login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Submitted by : (unknown) at: 2007-11-17T22:26:34-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

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

fricas
)se ou alg on
 
fricas
)se ou tex off
sin x
(1) sin(x)
Type: Expression(Integer)
fricas
width((sin x)::OutputForm)$OutputForm
The function width is not implemented in OutputForm .

However, the width for squares and fractions seems to be wrong:

fricas
x^2
2 (2) x
Type: Polynomial(Integer)
fricas
width((x^2)::OutputForm)$OutputForm
The function width is not implemented in OutputForm .

I would expect 2 here.

fricas
1/2
1 (3) - 2
Type: Fraction(Integer)
fricas
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

Status: open => rejected




  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: