Hi Greg, You now get a more personal view from my side.
I am wondering what is the use of the 'latex' function in FriCAS.
Nothing, currently. I have no idea about the history, but I do not see much use of it now. You could actually think of this: each element "know" how it should be represented in LaTeX.
And, more importantly, why it is not used by TeXFormat.
I guess, historical reasons and maybe a different view. There is basically the following question to solve.
You have n object types (basically elements from different domains) and m output formats (like 1d, 2d, latex, html, etc.). How do you implement that each domain can be output in each output format?
In FriCAS the view is that each element type can be converted to OutputForm and each OutputForm can be converted to each of the possible Formats.
You could also say each element type (i.e. each domain) knows how to format for each output format. Introducing a new output format then would require to add new functions to every domain in the library to support such output. (Looks like that this does not scale very well.)
The other extreme approach is that for each output format there is a function that knows how to represent each and every element type in this respective format. (Looks like that this is also not the best, because every time a new domain is added to the library, all the formatting functions must be told about it.
OutputForm is the FriCAS way to have a common API. I do not claim that this is perfect, but it's a reasonable approach.
Apparently the TeX format which is used when one issue ')set output tex on' in the interpreter uses only the "official" OutForm to translate it in LaTeX.
You should start to write the actual problem in your mails.
In fact I would like to have better control of the output.
I can only guess that I can help you with your problem. The formatting framework that I have programmed, is very flexible. Without looking at my old code, I would claim that you can even extend the formatters at runtime in order to handle new (i.e. unofficial) OutputForm operators.
Just specify precisely what you want to achieve. Warning, I will be away till Monday. Ralf -- 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 fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/b4b868a7-5a86-4962-8636-52b83680bd2b%40hemmecke.org.