-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an optional getname_as_string function #21
Comments
Maybe |
So this could be an optional method to implement for symbolic types, which defaults to calling |
Exactly! |
So for symbolics it would make that substitution and generate the string, but for normal Maybe the signature is |
Why is I was thinking something along the lines of get_display_name(sym::Symbol) = string(sym)
# In Symbolics/SymbolicUtils.jl
get_display_name(sym::Num) = hasname(sym) ? replace(string(getname(sym)), "₊" => ".") : string(Symbol(sym)) |
Adding sys allows anyone who implements the SII interface to add a dispatch and control printing of components of their systems. |
One issue with MTK symbol names is the need to use the unicode lower plus in hierarchical systems since a period can't be used, i.e. "act₊vol₁₊x".
Having a
getname_as_string
function would allow plot recipes, Latexify, and other formatters to have a systematic way to get a nicer representation of the variable/parameter name for display in output (i.e. SciMLBase could then usegetname_as_string
for plot recipes, and one could get a niceract.vol₁.x
type representation).The text was updated successfully, but these errors were encountered: