I wrote wrapper macros to achieve this to minimize code (and code copying).
My problem is that although these macros work fine as long as the label (text) does not
contain a , (comma) because thisÿ leads to a wrong number of arguments. (No surprise.)
Say, the macro has 3 arguments where the last argument defines the label, as
\def\mgoutputlabel[#1,#2,#3]{..}
;Then:
\mgoutputlabel[A,B,x_0^2]
; works fine, but\mgoutputlabel{A,B,D = (x_0,\;y_0)]
does not work (error message issued), so I tried\mgoutputlabel[A,B,D = (x_0\,\;y_0)]
where the macro outputs the label without issuing an error message, but the label output is D = (x_0 y_0) with the , ignored.
Anyway to fix this? I would like to get the output D = (x_0, y_0).)
The attached file contains the a simple complete case to illustrate this.
Your best,
Kent Holing