Symbolics.jl icon indicating copy to clipboard operation
Symbolics.jl copied to clipboard

Improve Latexify display for multiplication of parameters

Open TorkelE opened this issue 9 months ago • 4 comments

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)

Image

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)

TorkelE avatar Mar 09 '25 16:03 TorkelE

I have come across the same. Could make use of mult_symbol after https://github.com/korsbo/Latexify.jl/pull/325.

hersle avatar Mar 11 '25 11:03 hersle

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).

isaacsas avatar Apr 09 '25 01:04 isaacsas

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$$

ChrisRackauckas avatar Apr 09 '25 11:04 ChrisRackauckas

I presume that logic would be very difficult to write though, so I'm not even going to try for now.

ChrisRackauckas avatar Apr 09 '25 11:04 ChrisRackauckas