Question: keeping special math function names as is when translating to latex

When translating Maple expression with special math functions, Maple does not use the same familar name shown in worksheet, but replaces these special functions with one letter. 

This makes it very hard when looking at the equations in latex and the pdf to know what these special functions are. 

Is there an option to keep the same name used in Maple but use the \operatorname{name} in the latex generated? This will go a long way to improve the output and make one understand what they are looking at.

Here are examples below. Notice as side note, that Maple does not translate pochhammer at all. Is this a bug? It only gave its arguments in the latex. 

I think everyone will agree that reading BesselJ in the equation is more clear than reading J and reading hypergeom is more clear than and reading  MeijerG is more clear than and so on as one does not have to guess what these letters mean when looking at the final output in pdf.  
 

1384004

restart;

1384004

expr:=BesselJ(1,x);
latex(expr)

BesselJ(1, x)

J_{1}\! \left(x \right)

expr:=hypergeom( [],[],z );
latex(expr)

hypergeom([], [], z)

{}_{0}^{}{\moversetsp{}{\mundersetsp{}{F_{0}^{}}}}\! \left(;;z \right)

expr:=pochhammer(3/10, n);
latex(expr)

pochhammer(3/10, n)

\left(\frac{3}{10}\right)_{n}

expr:=MeijerG([[1, 1, 1, 1], []],[[], [4, 3, 2, 2]],Pi);
latex(expr)

MeijerG([[1, 1, 1, 1], []], [[], [4, 3, 2, 2]], Pi)

G_{4,4}^{0,4}\! \left(\pi \bigg| {\mstack{1,1,1,1}{4,3,2,2}}\right)

 


It should not be hard to provide an option for latex() in Maple (say Keep_special_function_math_names:=true) and keep default as is now.

Then all what Maple needs to do is simply generate \operatorname{BesselJ} instead of and \operatorname{hypergeom} instead of and \operatorname{pochhammer} and so on for any special function that does not have any standard Latex known notation. Even if one can argue that somewhere somehow someone should know that F is hypergeom and one should know that J means BesselJ and so on for dozens of other single letters used, I think it is much more clear to the reader to see the full name of the function as it shows in Maple worksheet.

The rest of the arguments remain the same exactly as shown by Maple on the screen and no need to make any changes there. It is only the name of the function which is the problem.

This only applies for all the special math function names ofcourse.

Any chance of making such changes to Maple's latex()? I tried to make the changes by post-processing the latex as string using patterns and string replace, but this was breaking things as it is not possible to just simply change letter J to BesselJ for example, as the letter J can be anything else in the latex. I think the best solution is to do this at the source, when the latex is generated by Maple.

Version 2023 on windows.

Download latex_math_functions.mw

ps. removed the list to make the question shorter as requested.

 

Please Wait...