pyreport LaTeX formulae not working

132 views Asked by At

I'm trying to create a HTML report using pyreport and it works up to the single point, that the LaTeX formulae are not generated.

Here is the input file I use for testing:

#$ This is \LaTeX : $c = 2\cdot(a+b)$

Than I run pyreport -l -t html --verbose file.py, but the report that I get is empty. When I add other comments to the input file, or some Python code, than it is displayed properly within the report. Here is the output from pyreport:

Running python script /tmp/file.py:

Outputing report to /tmp/file.html Ran script in 0.13s

I'm using Ubuntu and I have the texlive package installed. Why isn't the formula added to the report?

1

There are 1 answers

1
Eric D. On BEST ANSWER

I think i have find the problem. The problem is the RST tools to convert in html.

In pyreport, when you choose the math mode, the program will do the sentence in a bock

.. raw:: LaTeX
But in the new version of rst2html, this command doesnt work, it's replace by:
.. math::

If you use the command:

pyreport -l -e -t rst --verbose file.py
and after
rst2html file.rst > test.html

You will see the problem. You can change that in pyreport code, in main.py of pyreport. (use a locate to find it). And replace the

.. raw:: Latex
, by
 .. math::

The last problem is for the command \LaTeX, that's not in a math mode of latex. So it's not work.

You can report to RST documentation http://docutils.sourceforge.net/docs/ref/rst/directives.html#raw