I have encountered a strange error. Look at this code
var('π c ϕ')
C(q) = c*q
π(q) = ϕ*q-C(q)
show(LatexExpr(r"C(q) = "),C(q))
show(LatexExpr(r"π(q) = "),π(q))
It generates an error because $\phi$ is interpreted as $\varphi$. If I replace the first by the second there is no error.