On Thu, Nov 12, 2020 at 11:57:47AM +0100, Christopher Dimech wrote: > Have done more tests with @tex, @math, and @displaymath. > > \gdef is working for pdf output but not with MathJax.
I am not an expert in MathJax, but I think that MathJax only interpret the LaTeX/TeX locally, so cannot know about \Desig and will only interpret LaTeX/TeX "primary" commands. Maybe there is a possibility to give some TeX/LaTeX code to MathJax? In addition, when outputting html, @tex blocks are ignored. I checked with latex2html and tex4ht. The idea with latex2html and tex4ht is that there are intermediary files with the @tex, @math and @displaymath put in those files and then those files are run through latex2html or tex4ht and then the html fragment from each of the @-commands are put in the final output. For latex2html the @tex and @math and @displaymath are all put in the same file, so it works (though I have not checked if the order is kept as in the input file). For tex4ht the @tex, @math and @displaymath are each in a different file, so this does not work. Maybe the code could be changed to handle that case and try to put everything in the same file using the order of the Texinfo file.. > > > > Sent: Thursday, November 12, 2020 at 11:46 AM > > From: "Christopher Dimech" <[email protected]> > > To: "help-texinfo gnu" <[email protected]> > > Subject: MathJax problem with \gdef > > > > > > Have noticed a problem with including \gdef names in @math, > > possibly introduced after the MathJax implementation. Defining > > \Desig and calling it from @math{} fails. It also fails when > > doing output to pdf. > > > > @tex > > \gdef\Desig{\buildrel \rm def \over \equiv} > > @end tex > > > > @math{\Desig} > > > > > > >
