Hello,
I tried to pass an argument to my_lua_function but I want it as verbatim
argument because it may contain any characters TeX doesn't like.

It's ok with this callback for reading just one line after \Cmath:

\def\Cmath{\directlua{luatexbase.add_to_callback("process_input_buffer",parseCmath,"parseCmath")}}

\directlua{

function parseCmath(line)

luatexbase.remove_from_callback("process_input_buffer","parseCmath")
return my_lua_function(line)

end

}

\begin{document}

\Cmath

1/2

\end{document}


But I'd want to do the same with this syntax \Cmath{1/2}

Is it possible with a callback or anything else ?

Thank's for ideas.

Reply via email to