From: Robert D. <rob...@gm...> - 2023-07-16 16:06:21
|
On Sat, Jul 15, 2023 at 9:10 PM Eduardo Ochs <edu...@gm...> wrote: > nl : " > "$ > tex0(ex) := block([s,len], > s : tex(ex,false), > len : slength(s), > substring(s,3,len-2))$ > sa2(name,ex) := sconcat(nl, "\\sa{", name, "}{", tex0(ex), "}")$ An equivalent definition, and somewhat shorter, is, I think, sa2 (name, ex) := printf (false, "~%\\sa{~a}{~a}", name, tex1 (ex)); making use of built-in tex1 to produce a TeX string for ex, and ~% in printf to produce a newline. By the way, is this something related to pedagogy? I forget whether you said anything about that already. Hope this helps, Robert |