|
From: Robert D. <rob...@gm...> - 2023-11-18 20:39:55
|
I've made some progress on getting the Maxima console display (pretty printer) to use Unicode characters in the interest of greater clarity. I've captured some examples in a screenshot so that everyone sees the same thing. [image: maxima-unicode-display-work-in-progress-2023-11-17.png] These examples were composed with Maxima + SBCL; same results for Maxima + Clisp. I am running Maxima in GNOME Terminal (Ubuntu Linux). The hard part of this stuff is accounting for various use cases. Is the Lisp implementation Unicode-capable? Most are, but not GCL. What if the user wants to go back to the ASCII art display? I created a global flag maxima_unicode_display to allow for that. What if the Lisp implementation is capable but Unicode is disabled (e.g. because LANG does not designate a UTF-8 locale)? Clisp is the only example I know about; I handled that, I supposed if there are any others, we'll handle them case by case. The biggest question to me at present is how to handle the various display characters, e.g. absboxchar, boxchar, rmxchar, lmxchar, etc. I can't bring myself to introduce ASCII and Unicode variants of all those. Two solutions I can handle, conceptually speaking, are to apply those only when maxima_unicode_display is false, or just nuke them entirely, so that maxima_unicode_display = false has fixed characters for drawing. I would like to take this opportunity to emphasize that I DO NOT INTEND THAT THE USER MUST ALWAYS USE UNICODE CHARACTERS AND FOR ALL LISP IMPLEMENTATIONS. Sorry for shouting; I feel obliged to avoid misunderstandings. I have put the code I worked on so far on the branch dodier-maxima-unicode-display, comprising one commit at present, a856cbf, if anyone wants to take a look. This work is inspired by the patch suggested by Frederic Chapoton on the project web site. Thanks, Frederic! I have gone somewhat farther in hope of resolving some of the usability issues. See: https://sourceforge.net/p/maxima/feature-requests/185/ I don't remember for sure if anyone has worked on similar stuff in years past; if so, maybe someone can point it out. All the best, Robert |