From: Arthur N. <ac...@ca...> - 2024-01-09 11:22:59
|
On Tue, 9 Jan 2024, Francis Wright wrote: > I have a REDUCE version of leaf count that is almost ready to check in, once > I have checked a free more details. I want to make sure it behaves sensibly > on things like matrices. Nasser is using the Mathematica definition so I > decided to also follow that. > Francis > Excellent. I have checked in my naive version not knowing at all what Mathematica does - so my version is in packages/rtools/general.red so that you can replace it with your better version when you are ready. In the same spirit I have put a function "latex!-string" into rlfi.red which you see is also only half a dozed lines of code. It adjusts the lowest level latex print-token function so that if a magic flag is set the output from the conversion gets stashed in a list rather than going directly to output, then it turns that list into a string. Not tested in any serious way yet but there to try out and fix if needbe. Done this way that should work on PSL and PSL etc since it is done entirely within the Reduce world. Feel free to improve or replace! Arthur |