Can not latexify expressions converted from expressions of DynamicExpressions.jl
liuyxpp opened this issue · comments
MWE:
using SymbolicUtils
using DynamicExpressions
using Latexify
x1 = Node(; feature=1)
x2 = Node(; feature=2)
ex = (x1 + x2) / 2
ex_sym = node_to_symbolic(ex, operators)
latexify(ex_sym)
Errored with:
AssertionError: latexify does not support objects of type SymbolicUtils.BasicSymbolic{LiteralReal}.
Stacktrace:
[1] _latexraw(args::SymbolicUtils.BasicSymbolic{LiteralReal}; kwargs::@Kwargs{env::Symbol})
@ Latexify ~/.julia/packages/Latexify/yyxWo/src/latexraw.jl:109
[2] process_latexify(args::SymbolicUtils.BasicSymbolic{LiteralReal}; kwargs::@Kwargs{env::Symbol})
@ Latexify ~/.julia/packages/Latexify/yyxWo/src/latexify_function.jl:49
[3] process_latexify
@ ~/.julia/packages/Latexify/yyxWo/src/latexify_function.jl:40 [inlined]
[4] _latexinline(x::SymbolicUtils.BasicSymbolic{LiteralReal}; kwargs::@Kwargs{})
@ Latexify ~/.julia/packages/Latexify/yyxWo/src/latexinline.jl:4
[5] _latexinline(x::SymbolicUtils.BasicSymbolic{LiteralReal})
@ Latexify ~/.julia/packages/Latexify/yyxWo/src/latexinline.jl:3
[6] process_latexify(args::SymbolicUtils.BasicSymbolic{LiteralReal}; kwargs::@Kwargs{})
@ Latexify ~/.julia/packages/Latexify/yyxWo/src/latexify_function.jl:49
[7] process_latexify
@ ~/.julia/packages/Latexify/yyxWo/src/latexify_function.jl:40 [inlined]
[8] latexify(args::SymbolicUtils.BasicSymbolic{LiteralReal}; kwargs::@Kwargs{})
@ Latexify ~/.julia/packages/Latexify/yyxWo/src/latexify_function.jl:27
[9] latexify(args::SymbolicUtils.BasicSymbolic{LiteralReal})
@ Latexify ~/.julia/packages/Latexify/yyxWo/src/latexify_function.jl:25
[10] top-level scope
@ In[79]:5
Environment:
(notebooks) pkg> st
⌅ [a40a106e] DynamicExpressions v0.16.0
[23fbe1c1] Latexify v0.16.3
[d1185830] SymbolicUtils v1.6.0
Julia & OS:
julia> versioninfo()
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 128 × Intel(R) Xeon(R) Platinum 8362 CPU @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, icelake-server)
Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores)