#6344: Typesetting partial derivatives in new symbolics
---------------------------------+--------------------------
Reporter: gmhossain | Owner: burcin
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: Burcin Erocal | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------+--------------------------
Comment (by schymans):
I tried to apply the most recent patch, but did not succeed. It is just
too old and when looking at the diff I couldn't make any sense of it. I
tried to implement differential notation myself, but got stuck, perhaps
someone can help?
All I wanted to do is to change the _latex_ representation of the
FDerivativeOperator and added the following lines to
src/sage/symbolic/operators.py:
{{{
def _latex_(self):
"""
Return the LaTeX representation of X.
EXAMPLES::
sage: from sage.symbolic.operators import FDerivativeOperator
sage: var('x z')
sage: f = function('f', x, z)
sage: op = FDerivativeOperator(f, [0,1]); latex(op)
\frac{\partial \frac{\partial f }{\partial x } }{\partial z }
"""
fname = self._f.operator()
vars = self._f.operands()
difvars = self._parameter_set
str1 = str(fname)
for difvar in difvars:
str1 = '\\frac{\partial '+str1+'}{\partial
'+str(vars[difvar])+'}'
return str1
}}}
Unfortunately, this does not have any effect on the latex representation
of f.diff:
{{{
sage: f = function('f', x, z)
sage: g = diff(f, x,z)
sage: latex(g)
D[0, 1]\left(f\right)\left(x, z\right)
}}}
Does anyone have an idea what else I need to modify? Thanks in advance!
--
Ticket URL: <http://trac.sagemath.org/ticket/6344#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.