Symbolics.jl
Symbolics.jl copied to clipboard
Improve Latexify display for multiplication of parameters
Simple example:
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
@parameters q r
@variables X(t)
eqs = [D(X) ~ q*r - X]
@mtkbuild osys = ODESystem(eqs, t)
It might make sense to add a multiplication symbol to cases like this. E.g. quite often when two parameters are multiplied it basically looks like a single one. (I made some models in Catalyst where this produced rather weird model print outs)
I have come across the same. Could make use of mult_symbol after https://github.com/korsbo/Latexify.jl/pull/325.
This is a personal preference I'd say. I personally prefer the display given above to adding lots of mult symbols, which in big equations just eat up the display (I'd rather assume the viewer knows what the symbols of their model are so they can identify this is a product).
If I had a magic wand to what it looked like, I'd probably say for multi-letter names we should \text and then put mult symbols, so $$ab$$, $$\text{capacitor} \cdot b$$
I presume that logic would be very difficult to write though, so I'm not even going to try for now.