On 2019-06-11 at 04:17:15 +0300, Саша Козловский wrote: > Hello Henri. Maybe you right,and regexp is not good way. May be exists > ways to redefine $$ and $ in lualatex,because i want,that for formulas > with $$ and $ inserted actualtext,so i decided use lua callbacks,to > replace it in [] or (),because in this redefined commands i do insertion > of actualtext in formula. May be you know another ways,how insert > actualtext in formulas with $$ or $ (actualtext must contains tex > notation of this formula)? Thanks very mutch everybody for the any help > and any ideas.
Why do you need LuaTeX callbacks at all? Why don't you simply fix the source files? As Henri pointed out, regular expressions are quite problematic in some cases. Emacs provides a function to apply regexps semi-automatically (query-replace-regexp). You can skip problematic things and solve them later. For a fully automatic approach Emacs-Lisp is also a good choice. The ability to search backwards makes things easier. BTW, AFAIK there is no need to convert single $ signs to \( and \) in LaTeX. The $$ were always wrong, hence it makes more sense to fix them in the source files instead of using LuaTeX callbacks. Regards, Reinhard -- ------------------------------------------------------------------ Reinhard Kotucha Phone: +49-511-3373112 Marschnerstr. 25 D-30167 Hannover mailto:[email protected] ------------------------------------------------------------------
