someone wrote:
>
> > Does the functionality go in each domain, in which case the mathematics
> > code is cluttered with boilerplate code, or does the functionality go in
> > the drivers which gives less control over the output.
>
> Sometimes it would be useful if a domain could tell the printer how
> to format some specific piece of math.
>
> I got stuck with the printing of VectorAlgebra expressions for several
> reasons and ended up writing some custom "toLatex(...)" function.
>
> First it would be nice if vector elements could print differently from
> scalars (f.e. bold face). A more severe problem is that the operator "^"
> is used for the cross/wedge product and OutputForm insists to put the
> second operand on top of the first one assuming "^" is some kind of
> exponential.
>
> This is just a small example where the domain might know best how
> to output its members.
I think that most of this can be handled by richer OutputForm.
In your case some font support nad richer operators. Technically
it would be not hard to allow user-defined operators (as long as
they stay in some standard class) and user defined faces (of
course it would be up to user to provide info needed to
format operators and appropriate configuration data for faces).
I think however that usefulness of far going customization
(in OutputForm or via custom toLatex) is limited, because
parametrised domain in fact may have little idea about formating
its members, because they are build from parameters over which
domain has no contros. Imagine matrix of elements of vector
algebra, where matrix insist on italic entries, but vector
algebra wants roman vectors. Both can not be satisfied...
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.