Comment #1 on issue 1248 by ondrej.certik: Improve LaTeX printing support
http://code.google.com/p/sympy/issues/detail?id=1248
Thanks for the patch and sorry for my late reply -- it was Christmas Eve,
so I was a
little busy. :) Looks good, in general, couple points:
* use fold_frac_powers instead of foldFracPowers, as we follow that coding
style (I
think the default in Python)
* Add a simple docstring to _needs_function_brackets(), something
like "Returns True
if the expr needs brackets around it". Also, what is the difference between
_needs_brackets() and _needs_function_brackets()? Couldn't they be merged
into one
function? If not, it should be explained in their respective docstrings
* Please write tests for the new functionality
* also fix the other tests that fail:
$ bin/test sympy/printing/
============================= test process starts
==============================
executable: /usr/bin/python (2.5.2-final-0)
sympy/printing/pretty/tests/test_pretty.py[16] ................
[OK]
sympy/printing/pretty/tests/test_pretty_unicode.py[18] ..................
[OK]
sympy/printing/tests/test_ccode.py[4] ....
[OK]
sympy/printing/tests/test_gtk.py[1] X
[OK]
sympy/printing/tests/test_lambdarepr.py[2] ..
[OK]
sympy/printing/tests/test_latex.py[14] ....FF..F...fF
[FAIL]
sympy/printing/tests/test_mathml.py[7] .......
[OK]
sympy/printing/tests/test_precedence.py[11] ...........
[OK]
sympy/printing/tests/test_python.py[6] ......
[OK]
sympy/printing/tests/test_repr.py[19] ...................
[OK]
sympy/printing/tests/test_str.py[54] ...........................................
...........
[OK]
________________________________ xpassed tests
_________________________________
sympy/printing/tests/test_gtk.py:func_wrapper
________________________________________________________________________________
__________ sympy/printing/tests/test_latex.py:test_latex_derivatives
___________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_latex.py", line
65, in
test_latex_derivatives
r"$\frac{\partial}{\partial x} {x}^{3}$"
AssertionError
________________________________________________________________________________
___________ sympy/printing/tests/test_latex.py:test_latex_integrals
____________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_latex.py", line
71, in
test_latex_integrals
assert latex(Integral(x**2, (x,0,1))) == r"$\int_{0}^{1} {x}^{2}\,dx$"
AssertionError
________________________________________________________________________________
______________ sympy/printing/tests/test_latex.py:test_latex_dict
______________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_latex.py", line
97, in
test_latex_dict
assert latex(d) == '$\\begin{Bmatrix}1 : 1, & x : 3, & {x}^{2} : 2, &
{x}^{3} :
4\\end{Bmatrix}$'
AssertionError
________________________________________________________________________________
___________ sympy/printing/tests/test_latex.py:test_latex_Piecewise
____________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_latex.py", line
123, in
test_latex_Piecewise
assert latex(p) == "$\\left\\{\\begin{array}{cl} x & for x < 1
\\\\{x}^{2} &" \
AssertionError
== tests finished: 146 passed, 4 failed, 1 xfailed, 1 xpassed in 0.58
seconds ==
DO *NOT* COMMIT!
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---