If I may continue a bit on this topic. I’ve shortened it down to
ε = @variables ε_xx, ε_yy, ε_xy
@variables eta(ε[1], ε[2], ε[3])
D_v = [2eta 0 0; 0 2eta 0; 0 0 2eta]
J = Symbolics.jacobian( D_v*ε, ε )
Symbolics.substitute.(J, Ref(Dict(eta => η, (Symbolics.gradient(eta, ε) .=> dη)...)))
which is already super nice. But would there be a way not to do what I’ve done on line 2 (@variables eta(ε[1], ε[2], ε[3])). I’ve tried @variables eta(ε) which would be very concise but does not yield the same results.
Also, I wondered whether there was a way to display a dot on top of the unicode character \varepsilon (LateX \dot\varepsilon), but I guess that’s yet another topic…