Thanks for the responses. Hauke Rehr, I do enjoy exploration of approaches to a problem.
Ewart Shaw, your J-to-TeX is very impressive, although parameters for boxes require some tweaking mysides at least. Keeping files separate requires thinking about names and disallows quick edits, but keeps things much cleaner than my verbatim jungle. Jul 18, 2022, 12:36 by [email protected]: > I agree. > > (late to the party, I’ve been away for about a week) > > My first approach would have been to let J provide not only > the boxed display (a string) with | replaced by space > but also the tree structure and shapes of representations in boxes. > `$@":` > Then I’d first print the contents with lines matching '(+|-)*' blanked > in a verbatim (and thus fixed width) way, and overlay that with > boxes computed inside out, taking into account the respective shapes. > All of that 'Then' part, I’d do in lua, using the lualatex backend. > The actual drawing would most likely take place in metapost rather > than tikz (including luamplib) even though exact positioning of > overlayed graphics is much more easily achieved using tikz. > > But again, I agree: if spacing, especially of empty boxes, works > correctly the \cbox way, that looks like a better approach. > > Hoping this was of interest to anyone. > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
