[luatex] How to correct expand user commands in lualatex?
Henri Menke
henrimenke at gmail.com
Tue Jan 28 22:07:07 CET 2020
Dear Sasha,
That is impossible to do generically because LaTeX has fragile commands.
You can do it case-by-case using the \robustify macro from the etoolbox
package, but that has to be applied manually to all commands that appear
inside the equation and should not be expanded, e.g.:
\usepackage{etoolbox}
\robustify\frac
>From your use of unicode-math I infer that you are using LuaTeX, so why
don't you use the generic math tagging solution that I have spoonfed you
some time ago on TeX.SX?
https://tex.stackexchange.com/a/495230
Cheers, Henri
On 1/29/20 8:49 AM, Alexandr Kozlovskiy wrote:
> Hello everybody. I try to redefine equation environment,to insert
> actualtext of formula. But if i insert the space after equation,and use
> \expanded command,to correct expand commands,i get for arguments 1,1
> actualtext
> 1*1=\protect {\Ustack {\group_begin: 1\group_end: \@@over 1}}
> instead of actualtext like
> 1*1=\frac{1}{1}.
> Help me please,how correct expand user commands,to insert correct
> actualtext to formula.In attachment you will see an example,which not
> works for me. Thank you very much for any help.
>
More information about the luatex
mailing list.