You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Taken from Symbolics.jl and reduced to the minimum necessary for the code to work for param and variables.# https://github.com/JuliaSymbolics/Symbolics.jl/blob/c3f54a60c3b708ed33411a431d040de3a02d5f3d/src/latexify_recipes.jl#L140# Symbolics._toexpr does \\mathtt{var} for variables# see https://github.com/JuliaSymbolics/Symbolics.jl/pull/1305function_toexpr(O)
if Symbolics.issym(O)
sym =string(nameof(O))
returnSymbol(replace(sym, Symbolics.NAMESPACE_SEPARATOR =>"."))
end!Symbolics.iscall(O) &&return O
op = Symbolics.operation(O)
args = Symbolics.sorted_arguments(O)
if (op===(*)) && (args[1] ===-1)
arg_mul =Expr(:call, :(*), _toexpr(args[2:end])...)
returnExpr(:call, :(-), arg_mul)
endif Symbolics.symtype(op) <:Symbolics.FnTypeisempty(args) &&returnnameof(op)
returnExpr(:call, _toexpr(op), _toexpr(args)...)
elseif Symbolics.issym(op) && Symbolics.symtype(op) <:AbstractArrayreturn :(_textbf($(nameof(op))))
elseif op === identity
return_toexpr(only(args)) # suppress identity transformations (e.g. "identity(π)" -> "π")endreturnExpr(:call, Symbol(op), _toexpr(args)...)
end_toexpr(O::Num) =_toexpr(O.val)
This PR in symbolics break HB.jl.
The text was updated successfully, but these errors were encountered: