2

While in qtconsole, I can import init_vprinting from sympy.physics.mechanics and then use dynamicsymbols to acquire dotted derivatives. But when I use latex printer, I get 'da/dt' instead.

a = dynamicsymbols('a')
a.diff(t)

enter image description here

In: latex(a.diff(t))
Out: '\\frac{d}{d t} a{\\left (t \\right )}'

And I want something like

'\\dot{a}'
Eugene
  • 656
  • 8
  • 20

1 Answers1

1

SymPy's standard LaTeX printer does not contain any special logic for handling the objects of Physics modules. The special rules for printing Physics objects are implemented by the Physics module, as a function vlatex:

from sympy.physics.vector import vlatex
vlatex(a.diff(t))   #  outputs '\\dot{a}'