latexify_py icon indicating copy to clipboard operation
latexify_py copied to clipboard

Lack of equals sign

Open ShenzheZhu opened this issue 3 years ago • 2 comments

I dont know if it is my techniques problem. When I run the sample code on Pycharm and use the converted latex code, there is no equals sign between left hand expression and right hand expression.

11b89272a66074b52982a8a284fa87f

ShenzheZhu avatar Oct 30 '22 01:10 ShenzheZhu

@FywOo02 Thanks for reporting the problem. Could you check the following things:

  • What is printed if you run print(latexify.get_latex(your_function)). I guess your function may be the one in the example.
  • Whether your LaTeX compiler supports \triangleq ( $\triangleq$ ) or not.

odashi avatar Oct 30 '22 06:10 odashi

@FywOo02 Hi, I think the cause of this problem is that your LaTeX document lacks \usepackage{amssymb}.

\triangleq is a part of the AMS package that is enabled in Jupyter (MathJax) by default. But specifying amssymb is required if the generated source is used in your own LaTeX document.

I think this should be treated as a minor bug, and we may need to remove this symbol for compatibility with the bare LaTeX.

odashi avatar Oct 30 '22 17:10 odashi